home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 029a / helppc.zip / HARDWARE.TXT < prev    next >
Text File  |  1990-11-27  |  128KB  |  3,149 lines

  1. @Hardware Data and Specifications
  2. :6845:crtc
  3. ^6845 - Motorola CRT Controller
  4.  
  5.  3B0-3BB Monochrome Monitor Adapter
  6.  3D0-3DC Color Graphics Adapter (mapped similarly)
  7.  
  8.  3B0/3D0  port address decodes to 3B4/3D4
  9.  3B1/3D1  port address decodes to 3B5/3D5
  10.  3B2/3D2  port address decodes to 3B4/3D4
  11.  3B3/3D3  port address decodes to 3B5/3D5
  12.  3B4/3D4  6845 index register, selects which register [0-11h]
  13.           is to be accessed through port 3B5/3D5
  14.  3B5/3D5  6845 data register [0-11h] selected by port 3B4/3D4,
  15.           registers 0C-0F may be read.  If a read occurs
  16.           without the adapter installed, FFh is returned.
  17.  3B6/3D6  port address decodes to 3B4/3D4
  18.  3B7/3D7  port address decodes to 3B5/3D5
  19.  3B8/3D8  6845 Mode control register
  20.  3B9/3D9  color select register on color adapter
  21.  3BA/3DA  status register (read only)
  22.  3BB/3DB  light pen strobe reset
  23.      3DC  Preset Light pen latch
  24.      3DF  CRT/CPU page register (PCjr only)
  25.  
  26. %Registers: Accessed through ports 3B5 & 3D5    VALID VALUES
  27. %                                            MONO CO40 CO80 GRPH
  28.  00 - Horiz. total characters                 61   38   71   38
  29.  01 - Horiz. displayed characters per line    50   28   50   28
  30.  02 - Horiz. synch position                   52   2D   5A   2D
  31.  03 - Horiz. synch width in characters        0F   0A   0A   0A
  32.  04 - Vert. total lines                       19   1F   1F   7F
  33.  05 - Vert. total adjust (scan lines)         06   06   06   06
  34.  06 - Vert. displayed rows                    19   19   19   64
  35.  07 - Vert. Synch position (character rows)   19   1C   1C   70
  36.  08 - Interlace mode                          02   02   02   02
  37.  09 - Maximum scan line address               0D   07   07   01
  38.  0A - Cursor start (scan line)                0B   06   06   06
  39.  0B - Cursor end (scan line)                  0C   07   07   07
  40.  0C - Start address (MSB)                     00   00   00   00
  41.  0D - Start address (LSB)                     00   00   00   00
  42.  0E - Cursor address (MSB) (read/write)       00   --   --   --
  43.  0F - Cursor address (LSB) (read/write)       00   --   --   --
  44.  10 - Light pen (MSB)   (read only)           --   --   --   --
  45.  11 - Light pen (LSB)   (read only)           --   --   --   --
  46.  
  47.  - Registers 00-0D are write only, registers 0E-0F are read/write and
  48.    registers 10-11 are read only
  49.  - Cursor address is calculated with using the following (row*80)+col
  50.  
  51. ^6845 - Port 3B8 (Monochrome)
  52.  
  53.  │7│6│5│4│3│2│1│0│  3B8 CRT Control Port
  54.   │ │ │ │ │ │ │ └──── 1 = 80x25 text
  55.   │ │ │ │ │ └─┴───── unused
  56.   │ │ │ │ └──────── 1 = enable video signal
  57.   │ │ │ └───────── unused
  58.   │ │ └────────── 1 = blinking on
  59.   └─┴─────────── unused
  60.  
  61. ^6845 - Port 3D8 (Color)
  62.  
  63.  │7│6│5│4│3│2│1│0│  3D8 Mode Select Register
  64.   │ │ │ │ │ │ │ └──── 1 = 80x25 text, 0 = 40x25 text
  65.   │ │ │ │ │ │ └───── 1 = 320x200 graphics, 0 = text
  66.   │ │ │ │ │ └────── 1 = B/W, 0 = color
  67.   │ │ │ │ └─────── 1 = enable video signal
  68.   │ │ │ └──────── 1 = 640x200 B/W graphics
  69.   │ │ └───────── 1 = blink, 0 = no blink
  70.   └─┴────────── unused
  71.  
  72. ^6845 - Port 3D9 Color Text Modes
  73.  
  74.  │7│6│5│4│3│2│1│0│  3D9 Color Select Register (3B9 not used)
  75.   │ │ │ │ │ └─┴─┴──── screen/boarder RGB
  76.   │ │ │ │ └───────── select intensity setting
  77.   │ │ │ └────────── background intensity
  78.   └─┴─┴─────────── unused
  79.  
  80. ^6845 - Port 3D9 Color Graphics Modes
  81.  
  82.  │7│6│5│4│3│2│1│0│  3D9 Color Select Register (3B9 not used)
  83.   │ │ │ │ │ └─┴─┴──── RGB for background
  84.   │ │ │ │ └───────── intensity
  85.   │ │ │ └────────── unused
  86.   │ │ └─────────── 1 = palette 1, 0=palette 0 (see below)
  87.   └─┴──────────── unused
  88.  
  89.    Palette 0 = green, red, brown
  90.    Palette 1 = cyan, magenta, white
  91.  
  92. ^6845 - Port 3DA  Status Register
  93.  
  94.  │7│6│5│4│3│2│1│0│  3DA Status Register
  95.   │ │ │ │ │ │ │ └──── 1 = display enable, RAM access is OK
  96.   │ │ │ │ │ │ └───── 1 = light pen trigger set
  97.   │ │ │ │ │ └────── 0 = light pen on, 1 = light pen off
  98.   │ │ │ │ └─────── 1 = vertical retrace, RAM access OK for next 1.25ms
  99.   └─┴─┴─┴──────── unused
  100. :765:fdc:nec 765:8272:floppy controller
  101. ^NEC µPD765  -  Floppy Disk Controller  -  8272A
  102.  
  103. %PS/2 FDC Diskette Status Register A at 3F0h
  104.  
  105.  │7│6│5│4│3│2│1│0│  3F0h  PS/2 Disk Status Register A (read-only)
  106.   │ │ │ │ │ │ │ └──── direction
  107.   │ │ │ │ │ │ └───── write protect
  108.   │ │ │ │ │ └────── index
  109.   │ │ │ │ └─────── head 1 select
  110.   │ │ │ └──────── track 0
  111.   │ │ └───────── step
  112.   │ └────────── second drive installed
  113.   └─────────── interrupt pending
  114.  
  115. %PS/2 FDC Diskette Status Register B at 3F1h
  116.  
  117.  │7│6│5│4│3│2│1│0│  3F1h  PS/2 Disk Status Register B (read-only)
  118.   │ │ │ │ │ │ │ └──── motor enable 0
  119.   │ │ │ │ │ │ └──── motor enable 1
  120.   │ │ │ │ │ └──── write enable
  121.   │ │ │ │ └──── read data (toggles w/positive transition in -RD DATA)
  122.   │ │ │ └──── write data (toggles w/positive transition in WR DATA)
  123.   │ │ └──── drive select
  124.   └─┴──── reserved
  125.  
  126. %FDC Digital Output Register at 3F2h  (all systems)
  127.  
  128.  │7│6│5│4│3│2│1│0│  port 3F2h  (write only)
  129.   │ │ │ │ │ │ └─┴──── floppy drive select (0=A, 1=B, 2=floppy C, ...)
  130.   │ │ │ │ │ └─────── 1 = FDC enable, 0 = hold FDC at reset
  131.   │ │ │ │ └──────── 1 = DMA & I/O interface enabled  (reserved PS/2)
  132.   │ │ │ └───────── 1 = turn floppy drive A motor on
  133.   │ │ └────────── 1 = turn floppy drive B motor on
  134.   │ └─────────── 1 = turn floppy drive C motor on; (reserved PS/2)
  135.   └──────────── 1 = turn floppy drive D motor on; (reserved PS/2)
  136.  
  137.  - used to control drive motors, drive selection, and feature enable
  138.  - PS/2 only uses bit 0 for floppy drive select; bit 1 is reserved
  139.  - PS/2 only uses bits 5 & 4 for  motor enable; bits 7&6 are reserved
  140.  - all DOR bits are cleared during controller reset
  141.  
  142. %FDC Main Status Register at 3F4h  (all systems)
  143.  
  144.  │7│6│5│4│3│2│1│0│  port 3F4h  (read only)
  145.   │ │ │ │ │ │ │ └──── floppy drive 0 in seek mode/busy
  146.   │ │ │ │ │ │ └───── floppy drive 1 in seek mode/busy
  147.   │ │ │ │ │ └────── floppy drive 2 in seek mode/busy (reserved PS/2)
  148.   │ │ │ │ └─────── floppy drive 3 in seek mode/busy (reserved PS/2)
  149.   │ │ │ └──────── FDC read or write command in progress
  150.   │ │ └───────── FDC is in non-DMA mode
  151.   │ └────────── I/O direction;  1 = FDC to CPU; 0 = CPU to FDC
  152.   └─────────── data reg ready for I/O to/from CPU (request for master)
  153.  
  154. %FDC Command Status Register 0 at 3F5h  (all systems)
  155.  
  156.  │7│6│5│4│3│2│1│0│  Command Status Register 0 at port 3F5h
  157.   │ │ │ │ │ │ └─┴──── unit selected at interrupt (0=A, 1=B, 2=...)
  158.   │ │ │ │ │ └─────── head number at interrupt (head 0 or 1)
  159.   │ │ │ │ └──────── not ready on read/write or SS access to head 1
  160.   │ │ │ └───────── equipment check (see note)
  161.   │ │ └────────── set to 1 when FDD completes a seek command
  162.   └─┴─────────── last command status (see below)
  163.  
  164. %Bits
  165. % 76  Last Command Status
  166.   00  command terminated successfully
  167.   01  command execution started but terminated abnormally
  168.   10  invalid command issued
  169.   11  command terminated abnormally due to a change in state of
  170.        the Ready Signal from the FDC  (reserved on PS/2)
  171.  
  172.  - equipment check can occur if FDD signals a fault or track zero is
  173.    not found after 77 steps on a recalibrate command
  174.  - PS/2 only uses bits 1-0 for drive (values are 01b and 10b)
  175.  
  176. %FDC Command Status Register 1 at 3F5h  (all systems)
  177.  
  178.  │7│6│5│4│3│2│1│0│  Command Status Register 1 at port 3F5h
  179.   │ │ │ │ │ │ │ └──── FDC cannot find ID address mark (see reg 2)
  180.   │ │ │ │ │ │ └───── write protect detected during write
  181.   │ │ │ │ │ └────── FDC cannot find sector ID
  182.   │ │ │ │ └─────── unused (always zero)
  183.   │ │ │ └──────── over-run;  FDC not serviced in reasonable time
  184.   │ │ └───────── data error (CRC) in ID field or data field
  185.   │ └────────── unused (always zero)
  186.   └─────────── end of cylinder; sector# greater than sectors/track
  187.  
  188.  - bit 0 of Status Register 1 and bit 4 of Status Register 2 are
  189.    related and mimic each other
  190.  
  191. %FDC Command Status Register 2 at 3F5h  (all systems)
  192.  
  193.  │7│6│5│4│3│2│1│0│  Command Status Register 2 at port 3F5h
  194.   │ │ │ │ │ │ │ └──── missing address mark in data field
  195.   │ │ │ │ │ │ └───── bad cylinder, ID not found and Cyl Id=FFh
  196.   │ │ │ │ │ └────── scan command failed, sector not found in cylinder
  197.   │ │ │ │ └─────── scan command equal condition satisfied
  198.   │ │ │ └──────── wrong cylinder detected
  199.   │ │ └───────── CRC error detected in sector data
  200.   │ └────────── sector with deleted data address mark detected
  201.   └─────────── unused (always zero)
  202.  
  203.  - bit 0 of Status Register 1 and bit 4 of Status Register 2 are
  204.    related and mimic each other
  205.  
  206. %FDC Command Status Register 3 at 3F5h (FDD status, all systems)
  207.  
  208.  │7│6│5│4│3│2│1│0│  Floppy Disk Drive Status at port 3F5h
  209.   │ │ │ │ │ │ └─┴──── FDD unit selected status (0=A, 1=B, 2=...)
  210.   │ │ │ │ │ └─────── FDD side head select status (0=head 0, 1=head 1)
  211.   │ │ │ │ └──────── FDD two sided status signal
  212.   │ │ │ └───────── FDD track zero status signal
  213.   │ │ └────────── FDD ready status signal
  214.   │ └─────────── FDD write protect status signal
  215.   └──────────── FDD fault status signal
  216.  
  217. %PS/2 FDC Digital Input Register at 3F7h
  218.  
  219.  │7│6│5│4│3│2│1│0│  3F7h  PS/2 Digital Input Register (read only)
  220.   │ │ │ │ │ │ │ └─── high density select
  221.   │ └─┴─┴─┴─┴─┴──── reserved
  222.   └─────────────── diskette change
  223.  
  224. %PS/2 FDC Configuration Control Register at 3F7h
  225.  
  226.  │7│6│5│4│3│2│1│0│  3F7h  PS/2 Config. Control Register (write only)
  227.   │ │ │ │ │ │ └─┴── DRC1, DRC0  (see below)
  228.   └─┴─┴─┴─┴─┴───── reserved
  229.  
  230.  DRC1 DRC0
  231.    0   0    500000 bit per second mode
  232.    0   1    reserved
  233.    1   0    250000 bit per second mode
  234.    1   1    reserved
  235.  
  236.  
  237.  - Digital Input Register is used to sense the state of the
  238.    (-diskette change) and the (-high density select) signals
  239.  - Configuration Control Register is used to set the transfer rate
  240.  
  241.  
  242. ^FDC Programming Considerations
  243.  
  244. %Three phases of command execution:
  245.  
  246.  1.  Command phase; commands are sent from the CPU to the FDC via
  247.      port 3F5h;  bit 6 of the Status Register at 3F4h must be zero
  248.  2.  Execution phase; FDC executes instruction & generates INT 6
  249.  3.  Result phase; status and other information is available to CPU;
  250.      INT 6 sets bit 7 of BIOS Data Area location 40:3E which can
  251.      be polled for completion status
  252.  
  253.  
  254. %Example of a read operation:
  255.  
  256.  1. turn disk motor on and set delay time for drive spin up
  257.  2. perform seek operation;  wait for disk interrupt
  258.  3. prepare DMA chip to move data to memory
  259.  4. send read command and wait for transfer complete interrupt
  260.  5. read status information
  261.  6. turn disk motor off
  262.  
  263.  
  264. ^Floppy Diskette Controller Operations (15 commands)
  265.  
  266. %Read Data          D7  D6  D5  D4  D3  D2  D1  D0
  267.  
  268.  command byte 0:    MT  MF  SK   0   0   1   1   0
  269.  command byte 1:     ?   ?   ?   ?   ?  HD  US1 US0
  270.  command byte 2:    cylinder number
  271.  command byte 3:    head number
  272.  command byte 4:    sector number
  273.  command byte 5:    bytes per sector
  274.  command byte 6:    end of track (last sector in track)
  275.  command byte 7:    gap 3 length
  276.  command byte 8:    data length (if cmd byte 5==0)
  277.  result byte 0:     status register 0
  278.  result byte 1:     status register 1
  279.  result byte 2:     status register 2
  280.  result byte 3:     cylinder number
  281.  result byte 4:     head number
  282.  result byte 5:     sector number
  283.  result byte 6:     bytes per sector
  284.  
  285. %Read Deleted Data  D7  D6  D5  D4  D3  D2  D1  D0
  286.  
  287.  command byte 0:    MT  MF  SK   0   1   1   0   0
  288.  command byte 1:     ?   ?   ?   ?   ?  HD  US1 US0
  289.  command byte 2:    cylinder number
  290.  command byte 3:    head number
  291.  command byte 4:    sector number
  292.  command byte 5:    bytes per sector
  293.  command byte 6:    end of track (last sector in track)
  294.  command byte 7:    gap 3 length
  295.  command byte 8:    data length (if cmd byte 5==0)
  296.  result byte 0:     status register 0
  297.  result byte 1:     status register 1
  298.  result byte 2:     status register 2
  299.  result byte 3:     cylinder number
  300.  result byte 4:     head number
  301.  result byte 5:     sector number
  302.  result byte 6:     bytes per sector
  303.  
  304. %Write Data         D7  D6  D5  D4  D3  D2  D1  D0
  305.  
  306.  command byte 0:    MT  MF   0   0   0   1   0   1
  307.  command byte 1:     ?   ?   ?   ?   ?  HD  US1 US0
  308.  command byte 2:    cylinder number
  309.  command byte 3:    head number
  310.  command byte 4:    sector number
  311.  command byte 5:    bytes per sector
  312.  command byte 6:    end of track (last sector in track)
  313.  command byte 7:    gap 3 length
  314.  command byte 8:    data length (if cmd byte 5==0)
  315.  result byte 0:     status register 0
  316.  result byte 1:     status register 1
  317.  result byte 2:     status register 2
  318.  result byte 3:     cylinder number
  319.  result byte 4:     head number
  320.  result byte 5:     sector number
  321.  result byte 6:     bytes per sector
  322.  
  323. %Write Deleted Data D7  D6  D5  D4  D3  D2  D1  D0
  324.  
  325.  command byte 0:    MT  MF   0   0   1   0   0   1
  326.  command byte 1:     ?   ?   ?   ?   ?  HD  US1 US0
  327.  command byte 2:    cylinder number
  328.  command byte 3:    head number
  329.  command byte 4:    sector number
  330.  command byte 5:    bytes per sector
  331.  command byte 6:    end of track (last sector in track)
  332.  command byte 7:    gap 3 length
  333.  command byte 8:    data length (if cmd byte 5==0)
  334.  result byte 0:     status register 0
  335.  result byte 1:     status register 1
  336.  result byte 2:     status register 2
  337.  result byte 3:     cylinder number
  338.  result byte 4:     head number
  339.  result byte 5:     sector number
  340.  result byte 6:     bytes per sector
  341.  
  342. %Read a Track       D7  D6  D5  D4  D3  D2  D1  D0
  343. %(Diagnostic)
  344.  command byte 0:     0  MF  SK   0   0   0   1   0
  345.  command byte 1:     ?   ?   ?   ?   ?  HD  US1 US0
  346.  command byte 2:    cylinder number
  347.  command byte 3:    head number
  348.  command byte 4:    sector number
  349.  command byte 5:    bytes per sector
  350.  command byte 6:    end of track (last sector in track)
  351.  command byte 7:    gap 3 length
  352.  command byte 8:    data length (if cmd byte 5==0)
  353.  result byte 0:     status register 0
  354.  result byte 1:     status register 1
  355.  result byte 2:     status register 2
  356.  result byte 3:     cylinder number
  357.  result byte 4:     head number
  358.  result byte 5:     sector number
  359.  result byte 6:     bytes per sector
  360.  
  361. %Read ID            D7  D6  D5  D4  D3  D2  D1  D0
  362.  
  363.  command byte 0:     0  MF   0   0   1   0   1   0
  364.  command byte 1:     ?   ?   ?   ?   ?  HD  US1 US0
  365.  result byte 0:     status register 0
  366.  result byte 1:     status register 1
  367.  result byte 2:     status register 2
  368.  result byte 3:     cylinder number
  369.  result byte 4:     head number
  370.  result byte 5:     sector number
  371.  result byte 6:     bytes per sector
  372.  
  373. %Format a Track     D7  D6  D5  D4  D3  D2  D1  D0
  374. %(Write Sector IDs)
  375.  command byte 0:     0  MF   0   0   1   1   0   1
  376.  command byte 1:     ?   ?   ?   ?   ?  HD  US1 US0
  377.  command byte 2:    bytes per sector
  378.  command byte 3:    sectors per track
  379.  command byte 4:    gap 3 length
  380.  command byte 5:    filler pattern to write in each byte
  381.  result byte 0:     status register 0
  382.  result byte 1:     status register 1
  383.  result byte 2:     status register 2
  384.  result byte 3:     cylinder number
  385.  result byte 4:     head number
  386.  result byte 5:     sector number
  387.  result byte 6:     bytes per sector
  388.  
  389. %Scan Equal         D7  D6  D5  D4  D3  D2  D1  D0
  390.  
  391.  command byte 0:    MT  MF  SK   1   0   0   0   1
  392.  command byte 1:     ?   ?   ?   ?   ?  HD  US1 US0
  393.  command byte 2:    cylinder number
  394.  command byte 3:    head number
  395.  command byte 4:    sector number
  396.  command byte 5:    bytes per sector
  397.  command byte 6:    end of track (last sector in track)
  398.  command byte 7:    gap 3 length
  399.  command byte 8:    scan test (1=scan contiguous, 2=scan alternate)
  400.  result byte 0:     status register 0
  401.  result byte 1:     status register 1
  402.  result byte 2:     status register 2
  403.  result byte 3:     cylinder number
  404.  result byte 4:     head number
  405.  result byte 5:     sector number
  406.  result byte 6:     bytes per sector
  407.  
  408. %Scan Low or Equal  D7  D6  D5  D4  D3  D2  D1  D0
  409.  
  410.  command byte 0:    MT  MF  SK   1   1   0   0   1
  411.  command byte 1:     ?   ?   ?   ?   ?  HD  US1 US0
  412.  command byte 2:    cylinder number
  413.  command byte 3:    head number
  414.  command byte 4:    sector number
  415.  command byte 5:    bytes per sector
  416.  command byte 6:    end of track (last sector in track)
  417.  command byte 7:    gap 3 length
  418.  command byte 8:    scan test (1=scan contiguous, 2=scan alternate)
  419.  result byte 0:     status register 0
  420.  result byte 1:     status register 1
  421.  result byte 2:     status register 2
  422.  result byte 3:     cylinder number
  423.  result byte 4:     head number
  424.  result byte 5:     sector number
  425.  result byte 6:     bytes per sector
  426.  
  427. %Scan High or Equal D7  D6  D5  D4  D3  D2  D1  D0
  428.  
  429.  command byte 0:    MT  MF  SK   1   1   1   0   1
  430.  command byte 1:     ?   ?   ?   ?   ?  HD  US1 US0
  431.  command byte 2:    cylinder number
  432.  command byte 3:    head number
  433.  command byte 4:    sector number
  434.  command byte 5:    bytes per sector
  435.  command byte 6:    end of track (last sector in track)
  436.  command byte 7:    gap 3 length
  437.  command byte 8:    scan test (1=scan contiguous, 2=scan alternate)
  438.  result byte 0:     status register 0
  439.  result byte 1:     status register 1
  440.  result byte 2:     status register 2
  441.  result byte 3:     cylinder number
  442.  result byte 4:     head number
  443.  result byte 5:     sector number
  444.  result byte 6:     bytes per sector
  445.  
  446. %Recalibrate        D7  D6  D5  D4  D3  D2  D1  D0
  447.  
  448.  command byte 0:     0   0   0   0   0   1   1   1
  449.  command byte 1:     ?   ?   ?   ?   ?   0  US1 US0
  450.  returns nothing
  451.  
  452. %Sense Interrupt    D7  D6  D5  D4  D3  D2  D1  D0
  453. %    Status
  454.  command byte 0:     0   0   0   0   1   0   0   0
  455.  result byte 0:     status register 0
  456.  result byte 1:     present cylinder number
  457.  
  458. %Specify Step &     D7  D6  D5  D4  D3  D2  D1  D0
  459. %  Head Load
  460.  command byte 0:     0   0   0   0   0   0   1   1
  461.  command byte 1:    step rate time │ head unload time
  462.  command byte 2:    ──────head load time──────   ND
  463.  returns nothing
  464.  
  465. %Sense Drive        D7  D6  D5  D4  D3  D2  D1  D0
  466. %  Status
  467.  command byte 0:     0   0   0   0   0   1   0   0
  468.  command byte 1:     ?   ?   ?   ?   ?  HD  US1 US0
  469.  result byte 0:     status register 3
  470.  
  471. %Seek               D7  D6  D5  D4  D3  D2  D1  D0
  472.  
  473.  command byte 0:     0   0   0   0   1   1   1   1
  474.  command byte 1:     ?   ?   ?   ?   ?  HD  US1 US0
  475.  command byte 2:    new cylinder number
  476.  returns nothing
  477.  
  478. %µPD765 Version     D7  D6  D5  D4  D3  D2  D1  D0
  479.  
  480.  command byte 0:     ?   ?   ?   1   0   0   0   0
  481.  result byte 0:     status register 0
  482.                     90h = µPD765B;  80h = µPD765A or µPD765A-2
  483.  
  484. %Invalid Command
  485.  
  486.  result byte 0:     status register 0 (value of 80h)
  487.  
  488.  
  489. %Key to Abbreviations
  490.  HD = Head Number Selected       SK = SKip Deleted-data address mark
  491.  MT = Multi-Track                US0 = drive select bit 0
  492.  MF = MFM mode                   US1 = drive select bit 1
  493.  ND = Non-DMA mode
  494.  
  495.  Head Load Time = 2 to 254ms in 2ms increments
  496.  Head Unload Time = 16 to 240ms in 16ms increments
  497.  Step Rate Time = 1 to 16ms in 1ms increments
  498.  
  499.  
  500.  - PS/2 systems use the 8272A diskette controller which is software
  501.    and port compatible with the NEC µPD765
  502.  - accessed through ports 3F0h-3F7h;  NEC µPD765 is accessed through
  503.    ports 3F2h, 3F4h and 3F5h;   the 8272A uses ports 3F0h, 3F1h,
  504.    3F2h, 3F4h, 3F5h and 3F7h
  505.  - data, command and status registers are all accessed through
  506.    port 3F5h a register stack with one address presented to the bus
  507.  - bit 7 of BIOS Data Area byte 40:3E can be polled to determine
  508.    if a disk operation has completed;  this bit is set by the
  509.    interrupt handler when the operation has completed;  it should
  510.    be reset before continuing on with the next FDC operation
  511.  
  512.  - see   8237   BDA   INT TABLE   INT 13
  513.  
  514. :8042:keyboard controller
  515. ^8042 - Keyboard Controller  (AT,PS2)
  516.  
  517. %8042 Status Register (port 64h read)
  518.  
  519.  │7│6│5│4│3│2│1│0│  8042 Status Register
  520.   │ │ │ │ │ │ │ └──── output register (60h) has data for system
  521.   │ │ │ │ │ │ └───── input register (60h/64h) has data for 8042
  522.   │ │ │ │ │ └────── system flag (set to 0 after power on reset)
  523.   │ │ │ │ └─────── data in input register is command (1) or data (0)
  524.   │ │ │ └──────── 1=keyboard enabled, 0=keyboard disabled (via switch)
  525.   │ │ └───────── 1=transmit timeout (data transmit not complete)
  526.   │ └────────── 1=receive timeout (data transmit not complete)
  527.   └─────────── 1=even parity rec'd, 0=odd parity rec'd (should be odd)
  528.  
  529. %Port Mode                 Description
  530.  
  531.  64h  read   8042 status register. Can be read at any time.  See
  532.              table above for more information.
  533.  64h  write  8042 command register.  Writing this port sets Bit 3
  534.              of the status register to 1 and the byte is treated
  535.              as a controller command.  Devices attached to the
  536.              8042 should be disabled before issuing commands that
  537.              return data since data in the output register will
  538.              be overwritten.
  539.  60h  read   8042 output register (should only be read if Bit 0 of
  540.              status port is set to 1)
  541.  60h  write  8042 data register.  Data should only be written if
  542.              Bit 1 of the status register is zero (register is empty).
  543.              When this port is written Bit 3 of the status register
  544.              is set to zero and the byte is treated as a data.  The
  545.              8042 uses this byte if it's expecting data for a previous
  546.              command, otherwise the data is written directly to the
  547.              keyboard.   See   KEYBOARD COMMANDS  for information on
  548.              programming the actual keyboard hardware.
  549.  
  550.  
  551. ^8042 Commands Related to PC Systems  (Port 64h)
  552.  
  553. %Command                    Description
  554.  
  555.   20   Read 8042 Command Byte: current 8042 command byte is placed
  556.        in port 60h.  
  557.   60   Write 8042 Command Byte: next data byte written to port 60h is
  558.        placed in 8042 command register.  Format:
  559.  
  560.       │7│6│5│4│3│2│1│0│  8042 Command Byte
  561.        │ │ │ │ │ │ │ └──── 1=enable output register full interrupt
  562.        │ │ │ │ │ │ └───── should be 0
  563.        │ │ │ │ │ └────── 1=set status register system, 0=clear
  564.        │ │ │ │ └─────── 1=override keyboard inhibit, 0=allow inhibit
  565.        │ │ │ └──────── disable keyboard I/O by driving clock line low
  566.        │ │ └───────── disable auxiliary device, drives clock line low
  567.        │ └────────── IBM scancode translation 0=AT, 1=PC/XT
  568.        └─────────── reserved, should be 0
  569.  
  570.   A4   Password Installed Test: returned data can be read
  571.        from port 60h;  FA=password installed, F1=no password
  572.   A5   Load Security: bytes written to port 60h will be read
  573.        until a null (0) is found.
  574.   A6   Enable Security: works only if a password is already loaded
  575.   A7   Disable Auxiliary Interface: sets Bit 5 of command register
  576.        stopping auxiliary I/O by driving the clock line low
  577.   A8   Enable Auxiliary Interface: clears Bit 5 of command register
  578.   A9   Auxiliary Interface Test: clock and data lines are tested;
  579.        results placed at port 60h are listed below:
  580.  
  581.          00  no error
  582.          01  keyboard clock line is stuck low
  583.          02  keyboard clock line is stuck high
  584.          03  keyboard data line is stuck low
  585.          04  keyboard data line is stuck high
  586.  
  587.   AA   Self Test: diagnostic result placed at port 60h, 55h=OK
  588.   AB   Keyboard Interface Test:  clock and data lines are tested;
  589.        results placed at port 60h are listed above with command A9
  590.   AC   Diagnostic Dump: sends 16 bytes of 8042's RAM, current input
  591.        port state, current output port state and 8042 program status
  592.        word to port 60h in scan-code format.
  593.   AD   Disable Keyboard Interface: sets Bit 4 of command register
  594.        stopping keyboard I/O by driving the clock line low
  595.   AE   Enable Keyboard Interface: clears Bit 4 of command register
  596.        enabling keyboard interface.
  597.   C0   Read Input Port: data is read from its input port (which is
  598.        inaccessible to the data bus) and written to output register
  599.        at port 60h;  output register should be empty before call.
  600.  
  601.        │7│6│5│4│3-0│  8042 Input Port
  602.         │ │ │ │ └──── undefined
  603.         │ │ │ └───── 1=enable 2nd 256K of motherboard RAM, 0=disable
  604.         │ │ └────── 1=manufacturing jumper not installed, 0=installed
  605.         │ └─────── 1=primary display is MDA, 0=primary display is CGA
  606.         └──────── 1=keyboard not inhibited, 0=keyboard inhibited
  607.  
  608.   C1   Poll Input Port Low Bits: Bits 0-3 of port 1 placed in
  609.        status Bits 4-7
  610.   C2   Poll Input Port High Bits: Bits 4-7 of port 1 placed in
  611.        status Bits 4-7
  612.   D0   Read Output Port: data is read from 8042 output port (which is
  613.        inaccessible to the data bus) and placed in output register;
  614.        the output register should be empty.  (see command D1 below)
  615.   D1   Write Output Port: next byte written to port 60h is placed in
  616.        the 8042 output port (which is inaccessible to the data bus)
  617.  
  618.        │7│6│5│4│3│2│1│0│  8042 Output Port
  619.         │ │ │ │ │ │ │ └──── system reset line
  620.         │ │ │ │ │ │ └───── gate A20
  621.         │ │ │ │ └─┴────── undefined
  622.         │ │ │ └───────── output buffer full
  623.         │ │ └────────── input buffer empty
  624.         │ └─────────── keyboard clock (output)
  625.         └──────────── keyboard data (output)
  626.  
  627.   D2   Write Keyboard Output Register: next data byte written to
  628.        port 60h input register is written to port 60h output register
  629.        as if initiated by a device; invokes interrupt if enabled
  630.   D3   Write Auxiliary Output Register: next data byte written to
  631.        port 60h input register is written to port 60h output register
  632.        as if initiated by a device; invokes interrupt if enabled
  633.   D4   Write Auxiliary Device: next data byte written to input
  634.        register a port at 60h is sent to auxiliary device
  635.   E0   Read Test Inputs: 8042 reads its T0 and T1 inputs; data is
  636.        placed in output register;  Bit 0 is T0, Bit 1 is T1:
  637.  
  638.        │1│0│  Test Input Port Bits
  639.         │ └──── keyboard clock
  640.         └───── keyboard data
  641.  
  642.   Fx   Pulse Output Port: Bits 0-3 of the 8042 output port can be
  643.        pulsed low for 6 µs;  Bits 0-3 of command indicate which
  644.        Bits should be pulsed; 0=pulse, 1=don't pulse; pulsing
  645.        Bit 0 results in CPU reset since it is connected to system
  646.        reset line.
  647.  
  648.  - PC systems previous to the AT use the 8255 PPI as a keyboard
  649.    controller and use the keyboard's internal 8048.
  650.  - the keyboard's internal controller buffers up to 16 bytes of
  651.    make/break code information.  This is common among all PC systems
  652.    and shouldn't be confused with the (32 byte) keyboard buffer
  653.    maintained by the BIOS.
  654.  - see   KEYBOARD COMMANDS   for information on programming the
  655.    keyboards internal microprocessor.
  656. :8250:16450:16550:uart
  657. ^UART - Universal Asynchronous Receiver/Transmitter
  658.  
  659. %Port 3F8 - Baud Rate Divisor LSB if bit 7 of LCR is set (read/write)
  660. %           Transmit/Receive Buffer  (read/write)
  661.  
  662. %Port 3F9 - Baud Rate Divisor MSB if bit 7 of LCR is set (read/write)
  663. %           Interrupt Enable Register - IER  (read/write)
  664.  
  665.  │7│6│5│4│3│2│1│0│  2F9, 3F9: Interrupt Enable Register
  666.   │ │ │ │ │ │ │ └──── 1 = enable data available int (and 16550 Timeout)
  667.   │ │ │ │ │ │ └───── 1 = enable THRE interrupt
  668.   │ │ │ │ │ └────── 1 = enable lines status interrupt
  669.   │ │ │ │ └─────── 1 = enable modem-status-change interrupt
  670.   └─┴─┴─┴──────── always zero
  671.  
  672.  - 16550 will interrupt if data exists in the FIFO and isn't read
  673.    within the time it takes to receive four bytes or if no data is
  674.    received within the time it takes to receive four bytes.
  675.  
  676.  
  677. ^Port 3FA - Interrupt Identification Register - IIR  (read only)
  678.  
  679.  │7│6│5│4│3│2│1│0│  2FA, 3FA Interrupt ID Register
  680.   │ │ │ │ │ │ │ └──── 1 = no int. pending, 0=int. pending
  681.   │ │ │ │ │ └─┴───── Interrupt Id bits (see below)
  682.   │ │ │ │ └──────── 16550  1 = timeout int. pending, 0 for 8250/16450
  683.   │ │ └─┴───────── always zero
  684.   └─┴──────────── 16550  set to 1 if FIFO queues are enabled
  685.  
  686. %Bits
  687. % 21       Meaning            Priority         To reset
  688.   00  modem-status-change      lowest      read MSR
  689.   01  transmit-register-empty  low         read IIR / write THR
  690.   10  data-available           high        read rec buffer reg
  691.   11  line-status              highest     read LSR
  692.  
  693.  - interrupt pending flag uses reverse logic, 0 = pending, 1 = none
  694.  - interrupt will occur if any of the line status bits are set
  695.  - THRE bit is set when THRE register is emptied into the TSR
  696.  
  697.  
  698. ^Port 3FA - 16550 FIFO Control Register - FCR  (write only)
  699.  
  700.  │7│6│5│4│3│2│1│0│  2FA, 3FA  FIFO Control Register
  701.   │ │ │ │ │ │ │ └──── 1 = enable clear XMIT and RCVR FIFO queues
  702.   │ │ │ │ │ │ └───── 1 = clear RCVR FIFO
  703.   │ │ │ │ │ └────── 1 = clear XMIT FIFO
  704.   │ │ │ │ └─────── 1 = change RXRDY & TXRDY pins from mode 0 to mode 1
  705.   │ │ └─┴──────── reserved (always zero)
  706.   └─┴─────────── trigger level for RCVR FIFO interrupt
  707.  
  708. %Bits      RCVR FIFO
  709. % 76     Trigger Level
  710.   00        1 byte
  711.   01        4 bytes
  712.   10        8 bytes
  713.   11       14 bytes
  714.  
  715.  - Bit 0 must be set in order to write to other FCR bits
  716.  - Bit 1 when set to 1 the RCVR FIFO is cleared and this bit is reset.
  717.    The receiver shift register is not cleared.
  718.  - Bit 2 when set to 1 the XMIT FIFO is cleared and this bit is reset.
  719.    The transmit shift register is not cleared.
  720.  
  721.  
  722. ^Port 3FB - Line Control Register - LCR  (read/write)
  723.  
  724.  │7│6│5│4│3│2│1│0│  2FB, 3FB  Line Control Register
  725.   │ │ │ │ │ │ └─┴──── word length select bits (see below)
  726.   │ │ │ │ │ └─────── 0 = 1 stop bit, 1 = 1.5 or 2  (see note)
  727.   │ │ │ │ └──────── 0 = no parity, 1 = parity (PEN)
  728.   │ │ │ └───────── 0 = odd parity, 1 = even (EPS)
  729.   │ │ └────────── 0 = parity disabled, 1 = enabled
  730.   │ └─────────── 0 = turn break off, 1 = force spacing break state
  731.   └──────────── 1 = baud rate divisor (DLAB); 0 = RBR, THR or IER
  732.  
  733. %Bits
  734. % 10     Word length bits
  735.   00 = 5 bits per character
  736.   01 = 6 bits per character
  737.   10 = 7 bits per character
  738.   11 = 8 bits per character
  739.  
  740.  - stop bits = 1.5 for 5 bit words or 2 for 6, 7 or 8 bit words
  741.  - bit 7 changes the mode of registers 3F8 and 3F9.  If set these
  742.    registers become the LSB and MSB of the baud rate divisor.
  743.    Otherwise 3F8 is the Transmit/Receive Buffer Register and 3F9 is
  744.    the Interrupt Enable Register.
  745.  
  746.  
  747. ^Port 3FC - Modem Control Register - MCR  (read/write)
  748.  
  749.  │7│6│5│4│3│2│1│0│  2FC, 3FC  Modem Control Register
  750.   │ │ │ │ │ │ │ └──── 1 = activate DTR
  751.   │ │ │ │ │ │ └───── 1 = activate RTS
  752.   │ │ │ │ │ └────── OUT1
  753.   │ │ │ │ └─────── OUT2
  754.   │ │ │ └──────── 0 = normal, 1 = loop back test
  755.   └─┴─┴───────── always zero
  756.  
  757.  - If bit 4 is set, data from the Transmit Shift Register is received
  758.    in the Receiver Shift Register.  The SOUT line is set to logic
  759.    high, the SIN line and control lines are disconnected.   CTS, DSR,
  760.    RI and CD inputs are disconnected.  DTR, RTS, OUT1 and OUT2 are
  761.    then connected internally.
  762.  
  763.  
  764. ^Port 3FD - Line Status Register - LSR  (read only)
  765.  
  766.  │7│6│5│4│3│2│1│0│  2FD, 3FD Line Status Register
  767.   │ │ │ │ │ │ │ └──── 1 = data ready
  768.   │ │ │ │ │ │ └───── 1 = overrun error (OE)
  769.   │ │ │ │ │ └────── 1 = parity error (PE)
  770.   │ │ │ │ └─────── 1 = framing error (FE)
  771.   │ │ │ └──────── 1 = break interrupt  (BI)
  772.   │ │ └───────── 1 = transmitter holding register empty (THRE)
  773.   │ └────────── 1 = transmitter shift register empty (TSRE)
  774.   └─────────── 1 = 16550 PE/FE/Break in FIFO queue, 0 for 8250 & 16450
  775.  
  776.  - Bit 0 is set when a byte is placed in the Receiver Buffer Register
  777.    and cleared when the byte is read by the CPU (or when the CPU
  778.    clears the FIFO for the 16550).  Results in Receive Data Available
  779.    Interrupts if enabled.
  780.  - Bits 1-4 indicate errors and result in Line Status Interrupts
  781.    if enabled.
  782.  - Bit 1 is set when a second byte is received before the byte
  783.    in the Receiver Buffer Register is read by the CPU (the 16550 in
  784.    FIFO mode sets this bit when the queue is full and the byte in the
  785.    Receiver Shift Register hasn't been moved into the queue).  This
  786.    bit is reset when the CPU reads the LSR
  787.  - Bit 2 is set whenever a byte is received that doesn't match the
  788.    requested parity.  Reset upon reading the LSR.  (The 16550 maintains
  789.    parity information with each byte and sets bit 2 only when the byte
  790.    is at the top of the FIFO queue.)
  791.  - Bit 3 is set when a character is received without proper stop
  792.    bits.  Upon detecting a framing error the UART attempts to
  793.    resynchronize.  Reset by reading the LSR.  (The 16550 maintains
  794.    this information with each byte and sets bit 3 only when the byte
  795.    is at the top of the FIFO queue.)
  796.  - Bit 4 is set when a break condition is sensed (when space is
  797.    detected for longer than 1 fullword).  A zero byte is placed in
  798.    the Receiver Buffer Register (or 16550 FIFO).  Reset by reading
  799.    the LSR.  (The 16550 maintains this information with each byte and
  800.    sets bit 4 only when the byte is at the top of the FIFO queue.)
  801.  - Bit 5 is set when the Transmit Holding Register shifts a byte
  802.    into the Transmit Shift Register (or XMIT FIFO queue is empty for
  803.    16550) and is cleared when a byte is written to the THR (or the
  804.    XMIT FIFO).   Results in Transmit Holding Register Empty interrupts
  805.    if enabled.
  806.  - Bit 6 is set when both the Transmitter Holding Register and the
  807.    Transmitter Shift Register are empty. On the 16550, when the XMIT
  808.    FIFO and Transmitter Shift Register are empty.
  809.  - Bit 7 is 16550 specific and indicates there is a byte in the FIFO
  810.    queue that was received with a Parity, Framing or Break error.
  811.  
  812.  
  813. ^Port 3FE - Modem Status Register - MSR
  814.  
  815.  │7│6│5│4│3│2│1│0│  2FE, 3FE Modem Status Register
  816.   │ │ │ │ │ │ │ └──── 1 = DCTS  Delta CTS  (CTS changed) 
  817.   │ │ │ │ │ │ └───── 1 = DDSR  Delta DSR  (DSR changed)
  818.   │ │ │ │ │ └────── 1 = RI ring indicator changed
  819.   │ │ │ │ └─────── 1 = DDCD  Delta Data Carrier Detect (DCD changed)
  820.   │ │ │ └──────── 1 = CTS
  821.   │ │ └───────── 1 = DSR
  822.   │ └────────── 1 = ring indicator (RI)
  823.   └─────────── 1 = receive line signal detect
  824.  
  825.  - Bits 0-3 are reset when the CPU read the MSR
  826.  - Bit 4 is the Modem Control Register RTS during loopback test
  827.  - Bit 5 is the Modem Control Register DTR during loopback test
  828.  - Bit 6 is the Modem Control Register OUT1 during loopback test
  829.  - Bit 7 is the Modem Control Register OUT2 during loopback test
  830.  
  831. ^Port 3FF/2FF - Scratch Pad Register  (read/write)
  832.  
  833. %Programming considerations:
  834.  - 8250's, 16450's are essentially identical to program
  835.  - 16550's is pin and software compatible with the 16450 but has an
  836.    internal FIFO queue that may be enabled/disabled by software
  837.  - PCs are capable of 38.4Kb, while AT's are capable of 115.2Kb
  838.  - receiver checks only the first stop bit of each character regardless
  839.    of the number of stop bits specified
  840.  - Older 8250 and 16450 UARTs may lose THRE interrupt if the THRE and
  841.    Receive Data (RD) or the Line Status (LS) interrupts occur
  842.    simultaneously during a full duplex transmission.  RD and LS have
  843.    higher priority than THRE which causes the lower priority interrupt
  844.    to be lost.  The following are 3 method used to avoid this problem:
  845.   
  846.    1. Disable/re-enable THRE interrupt via the IER after processing
  847.       Receive Data & Line Status interrupts.
  848.    2. While inside the RD and LS interrupt routines check the LSR
  849.       THRE bit and set a flag that a THRE interrupt was waiting.
  850.    3. Poll the LSR THRE bit instead of using the IRR.
  851.    
  852.  - data loss can occur without overrun or framing errors if the
  853.    interrupts are serviced to slowly
  854.  - 
  855.  - see  INT TABLE   or  IRQ  for interrupt assignments
  856.  - see  PORTS   for COMx port assignment (3F8,2F8,3E8,2E8,3220...)
  857. :8253:8254:pit:timer
  858. ^8253/8254 PIT - Programmable Interval Timer
  859.  
  860.  Port 40h, 8253 Counter 0 Time of Day Clock (normally mode 3)
  861.  Port 41h, 8253 Counter 1 RAM Refresh Counter (normally mode 2)
  862.  Port 42h, 8253 Counter 2 Cassette and Speaker Functions
  863.  Port 43h, 8253 Mode Control Register, data format:
  864.  
  865.  │7│6│5│4│3│2│1│0│  Mode Control Register
  866.   │ │ │ │ │ │ │ └──── 0=16 binary counter, 1=4 decade BCD counter
  867.   │ │ │ │ └─┴─┴───── counter mode bits
  868.   │ │ └─┴────────── read/write/latch format bits
  869.   └─┴───────────── counter select bits (also 8254 read back command)
  870.  
  871. %Bits
  872. % 76 Counter Select Bits
  873.   00  select counter 0
  874.   01  select counter 1
  875.   10  select counter 2
  876.   11  read back command (8254 only, illegal on 8253, see below)
  877.  
  878. %Bits
  879. % 54  Read/Write/Latch Format Bits
  880.   00  latch present counter value
  881.   01  read/write of MSB only
  882.   10  read/write of LSB only
  883.   11  read/write LSB, followed by write of MSB
  884.  
  885. %Bits
  886. %321  Counter Mode Bits
  887.  000  mode 0, interrupt on terminal count;  countdown, interrupt,
  888.       then wait for a new mode or count; loading a new count in the
  889.       middle of a count stops the countdown
  890.  001  mode 1, programmable one-shot; countdown with optional
  891.       restart; reloading the counter will not affect the countdown
  892.       until after the following trigger
  893.  010  mode 2, rate generator; generate one pulse after 'count' CLK
  894.       cycles; output remains high until after the new countdown has
  895.       begun; reloading the count mid-period does not take affect
  896.       until after the period
  897.  011  mode 3, square wave rate generator; generate one pulse after
  898.       'count' CLK cycles; output remains high until 1/2 of the next
  899.       countdown; it does this by decrementing by 2 until zero, at
  900.       which time it lowers the output signal, reloads the counter
  901.       and counts down again until interrupting at 0; reloading the
  902.       count mid-period does not take affect until after the period
  903.  100  mode 4, software triggered strobe; countdown with output high
  904.       until counter zero;  at zero output goes low for one CLK
  905.       period;  countdown is triggered by loading counter;  reloading
  906.       counter takes effect on next CLK pulse
  907.  101  mode 5, hardware triggered strobe; countdown after triggering
  908.       with output high until counter zero; at zero output goes low
  909.       for one CLK period
  910.  
  911. %Read Back Command Format  (8254 only)
  912.  
  913.  │7│6│5│4│3│2│1│0│ Read Back Command (written to Mode Control Reg)
  914.   │ │ │ │ │ │ │ └─── must be zero
  915.   │ │ │ │ │ │ └──── select counter 0
  916.   │ │ │ │ │ └───── select counter 1
  917.   │ │ │ │ └────── select counter 2
  918.   │ │ │ └─────── 0 = latch status of selected counters
  919.   │ │ └──────── 0 = latch count of selected counters
  920.   └─┴───────── 11 = read back command
  921.  
  922. %Read Back Command Status (8254 only, read from counter register)
  923.  
  924.  │7│6│5│4│3│2│1│0│  Read Back Command Status
  925.   │ │ │ │ │ │ │ └─── 0=16 binary counter, 1=4 decade BCD counter
  926.   │ │ │ │ └─┴─┴──── counter mode bits (see Mode Control Reg above)
  927.   │ │ └─┴───────── read/write/latch format (see Mode Control Reg)
  928.   │ └──────────── 1=null count (no count set), 0=count available
  929.   └───────────── state of OUT pin (1=high, 0=low)
  930.  
  931.  
  932.  - the 8253 is used on the PC & XT, while the 8254 is used on the AT+
  933.  - all counters are decrementing and fully independent
  934.  - the PIT is tied to 3 clock lines all generating 1.19318 MHz.
  935.  - the value of 1.19318MHz is derived from (4.77/4 MHz) and has it's
  936.    roots based on NTSC frequencies
  937.  - counters are 16 bit quantities which are decremented and then
  938.    tested against zero.  Valid range is (0-65535).  To get a value
  939.    of 65536 clocks you must specify 0 as the default count since
  940.    65536 is a 17 bit value.
  941.  - reading by latching the count doesn't disturb the countdown but
  942.    reading the port directly does; except when using the 8254 Read
  943.    Back Command
  944.  - counter 0 is the time of day interrupt and is generated
  945.    approximately 18.2 times per sec.  The value 18.2 is derived from
  946.    the frequency 1.10318/65536 (the normal default count).
  947.  - counter 1 is normally set to 18 (dec.) and signals the 8237 to do
  948.    a RAM refresh approximately every 15µs
  949.  - counter 2 is normally used to generate tones from the speaker
  950.    but can be used as a regular counter when used in conjunction
  951.    with the 8255
  952.  - newly loaded counters don't take effect until after a an output
  953.    pulse or input CLK cycle depending on the mode
  954.  - the 8253 has a max input clock rate of 2.6MHz, the 8254 has max
  955.    input clock rate of 10MHz
  956.  
  957. %Programming considerations:
  958.  
  959.    1.  load Mode Control Register
  960.    2.  let bus settle (jmp $+2)
  961.    3.  write counter value
  962.    4.  if counter 0 is modified, an INT 8 handler must be written to
  963.        call the original INT 8 handler every 18.2 seconds.  When it
  964.        does call the original INT 8 handler it must NOT send and EOI
  965.        to the 8259 for the timer interrupt, since the original INT 8
  966.        handler will send the EOI also.
  967.  
  968. %Example code:
  969.  
  970.  countdown  equ  8000h ; approx 36 interrupts per second
  971.  
  972.     cli
  973.     mov  al,00110110b  ; bit 7,6 = (00) timer counter 0
  974.                        ; bit 5,4 = (11) write LSB then MSB
  975.                        ; bit 3-1 = (011) generate square wave
  976.                        ; bit 0 = (0) binary counter
  977.     out  43h,al        ; prep PIT, counter 0, square wave&init count
  978.     jmp  $+2
  979.     mov  cx,countdown  ; default is 0x0000 (65536) (18.2 per sec)
  980.                        ; interrupts when counter decrements to 0
  981.     mov  al,cl         ; send LSB of timer count
  982.     out  40h,al
  983.     jmp  $+2
  984.     mov  al,ch         ; send MSB of timer count
  985.     out  40h,al
  986.     jmp  $+2
  987.     sti
  988. :8259:pic
  989. ^8259  Programmable Interrupt Controller  (PIC)
  990.  
  991. %Initialization Command Word 1 at Port 20h and A0h
  992.  
  993.  │7│6│5│4│3│2│1│0│  ICW1
  994.   │ │ │ │ │ │ │ └──── 1=ICW4 is needed, 0=no ICW4 needed
  995.   │ │ │ │ │ │ └───── 1=single 8259, 0=cascading 8259's
  996.   │ │ │ │ │ └────── 1=4 byte interrupt vectors, 0=8 byte int vectors
  997.   │ │ │ │ └─────── 1=level triggered mode, 0=edge triggered mode
  998.   │ │ │ └──────── must be 1 for ICW1 (port must also be 20h or A0h)
  999.   └─┴─┴───────── must be zero for PC systems
  1000.  
  1001. %Initialization Command Word 2 at Port 21h and A1h
  1002.  
  1003.  │7│6│5│4│3│2│1│0│  ICW2
  1004.   │ │ │ │ │ └─┴─┴──── 000= on 80x86 systems
  1005.   └─┴─┴─┴─┴───────── A7-A3 of 80x86 interrupt vector
  1006.  
  1007. %Initialization Command Word 3 at Port 21h and A1h
  1008.  
  1009.  │7│6│5│4│3│2│1│0│  ICW3 for Master Device
  1010.   │ │ │ │ │ │ │ └──── 1=interrupt request 0 has slave, 0=no slave
  1011.   │ │ │ │ │ │ └───── 1=interrupt request 1 has slave, 0=no slave
  1012.   │ │ │ │ │ └────── 1=interrupt request 2 has slave, 0=no slave
  1013.   │ │ │ │ └─────── 1=interrupt request 3 has slave, 0=no slave
  1014.   │ │ │ └──────── 1=interrupt request 4 has slave, 0=no slave
  1015.   │ │ └───────── 1=interrupt request 5 has slave, 0=no slave
  1016.   │ └────────── 1=interrupt request 6 has slave, 0=no slave
  1017.   └─────────── 1=interrupt request 7 has slave, 0=no slave
  1018.  
  1019.  │7│6│5│4│3│2│1│0│  ICW3 for Slave Device
  1020.   │ │ │ │ │ └─┴─┴──── master interrupt request slave is attached to
  1021.   └─┴─┴─┴─┴───────── must be zero
  1022.  
  1023. %Initialization Command Word 4 at Port 21h and A1h
  1024.  
  1025.  │7│6│5│4│3│2│1│0│  ICW4
  1026.   │ │ │ │ │ │ │ └──── 1 for 80x86 mode, 0 = MCS 80/85 mode
  1027.   │ │ │ │ │ │ └───── 1 = auto EOI, 0=normal EOI
  1028.   │ │ │ │ └─┴────── slave/master buffered mode (see below)
  1029.   │ │ │ └───────── 1 = special fully nested mode (SFNM), 0=sequential
  1030.   └─┴─┴────────── unused (set to zero)
  1031.  
  1032. %Bits
  1033. % 32     Buffering Mode
  1034.   00     not buffered
  1035.   01     not buffered
  1036.   10     buffered mode slave (PC mode)
  1037.   11     buffered mode master (PC mode)
  1038.  
  1039. %Operation Control Word 1 / Interrupt Mask Reg.  (Ports 21h & A1h)
  1040.  
  1041.  │7│6│5│4│3│2│1│0│  OCW1 - IMR Interrupt Mask Register
  1042.   │ │ │ │ │ │ │ └──── 0 = service IRQ0, 1 = mask off
  1043.   │ │ │ │ │ │ └───── 0 = service IRQ1, 1 = mask off
  1044.   │ │ │ │ │ └────── 0 = service IRQ2, 1 = mask off
  1045.   │ │ │ │ └─────── 0 = service IRQ3, 1 = mask off
  1046.   │ │ │ └──────── 0 = service IRQ4, 1 = mask off
  1047.   │ │ └───────── 0 = service IRQ5, 1 = mask off
  1048.   │ └────────── 0 = service IRQ6, 1 = mask off
  1049.   └─────────── 0 = service IRQ7, 1 = mask off
  1050.  
  1051. %Operation Control Word 2 / Interrupt Command Reg. (Ports 20h & A0h)
  1052.  
  1053.  │7│6│5│4│3│2│1│0│  OCW2 - ICR Interrupt Command Register
  1054.   │ │ │ │ │ └─┴─┴──── interrupt request level to act upon
  1055.   │ │ │ │ └───────── must be 0 for OCW2
  1056.   │ │ │ └────────── must be 0 for OCW2
  1057.   └─┴─┴─────────── EOI type (see table)
  1058.  
  1059. %Bits
  1060. %765  EOI - End Of Interrupt code (PC specific)
  1061.  001  non-specific EOI command
  1062.  010  NOP
  1063.  011  specific EOI command
  1064.  100  rotate in automatic EOI mode
  1065.  101  rotate on non-specific EOI command
  1066.  110  set priority command  (uses bits 2-0)
  1067.  111  rotate on specific EOI command
  1068.  
  1069. %Operation Control Word 3   (Ports 20h & A0h)
  1070.  
  1071.  │7│6│5│4│3│2│1│0│  OCW3
  1072.   │ │ │ │ │ │ │ └─── 1=read IRR on next read, 0=read ISR on next read
  1073.   │ │ │ │ │ │ └──── 1=act on value of bit 0, 0=no action if bit 0 set
  1074.   │ │ │ │ │ └───── 1=poll command issued, 0=no poll command issued
  1075.   │ │ │ │ └────── must be 1 for OCW3
  1076.   │ │ │ └─────── must be 0 for OCW3
  1077.   │ │ └──────── 1=set special mask, 0=reset special mask
  1078.   │ └───────── 1=act on value of bit 5, 0=no action if bit 5 set
  1079.   └────────── not used (zero)
  1080.  
  1081. %Other Registers
  1082.  
  1083.  IRR - Interrupt Request Register, maintains a bit vector indicating
  1084.        which IRQ hardware events are awaiting service.   Highest
  1085.        level interrupt is reset when the CPU acknowledges interrupt.
  1086.  ISR - In Service Register, tracks IRQ line currently being serviced.
  1087.        Updated by EOI command.
  1088.  
  1089.  
  1090. ^Hardware Interrupt Sequence of Events:
  1091.  
  1092.  1. 8259 IRQ signal is raised high by hardware setting the
  1093.     corresponding IRR bits true.
  1094.  
  1095.  2. PIC evaluates the interrupt requests and signals the CPU
  1096.     where appropriate.
  1097.  
  1098.  3. CPU acknowledges the INT by pulsing INTA (inverted)
  1099.  
  1100.  4. INTA signal from CPU is received by the PIC, which then sets the
  1101.     highest priority ISR bit, and clears the corresponding IRR bit
  1102.  
  1103.  5. CPU sends a second INTA pulse which causes the PIC to send the
  1104.     interrupt ID byte onto the bus.  CPU begins interrupt processing.
  1105.  
  1106.  6. Interrupts of lower and equal priority are blocked until a
  1107.     Non-Specific EOI (20h) is sent to the command port.
  1108.  
  1109.  
  1110. ^Initialization Procedure
  1111.  
  1112. %Initialization
  1113.   1. write ICW1 to port 20h
  1114.   2. write ICW2 to port 21h
  1115.   3. if ICW1 bit D1=1  do nothing
  1116.      if ICW1 bit D1=0  write ICW3 to port 20h
  1117.   4. write ICW4 to port 21h
  1118.   5. OCW's can follow in any order
  1119.  
  1120.  
  1121. ^8259 Programmable Interrupt Controller Notes
  1122.  
  1123.  - Operation Command Word (OCW), commands that set the 8259 in
  1124.    various interrupt modes.  These can be written to the 8259
  1125.    anytime after initialization.
  1126.  - The 8259 differentiates between the OCW1, OCW2 and OCW3 by the
  1127.    port address and the value of the data bits D4 and D3.  ICW2
  1128.    through ICW4 are order related and must follow ICW1.  ICW1 is
  1129.    identified by an even port number and data bit D4 set to 1.
  1130.  - PCs operate in fully nested mode, where a Non-Specific EOI resets
  1131.    the interrupt identified by the highest bit value in the ISR
  1132.  - 8259s can be chained together where the INT pin (output) of a
  1133.    slave 8259 can be used as the input to an IRQ line allowing up
  1134.    to 64 priority vectored interrupts.  AT level machines use two
  1135.    8259's for a total of 16 hardware interrupt levels
  1136.  - the first 8259 ports are located at 20h and 21h
  1137.  - the second 8259 ports are located at A0h and A1h
  1138.  - PC and AT interrupts are Edge Triggered while PS/2's are Level
  1139.    Triggered
  1140.  - some ASIC chips designed for Tandy 1000 Systems malfunction if
  1141.    specific and non-specific EOIs are mixed
  1142.  - for a more in-depth discussion of the 8259, see Intel's "Micro-
  1143.    processor and Peripherals Handbook, Volume I"
  1144.  
  1145.  - see   PORTS   and   INT TABLE
  1146. :capacitor values
  1147. ^Ceramic File Capacitor Color Code Chart
  1148.  
  1149. %     Color     Digit     Multiplier
  1150.  
  1151.       Black       0        1
  1152.       Brown       1        10
  1153.       Red         2        100            Gold     ± 5% tolerance
  1154.       Orange      3        1,000          Silver   ±10% tolerance
  1155.       Yellow      4        10,000         White    ±10% tolerance
  1156.       Green       5        100,000
  1157.       Blue        6        1,000,000
  1158.       Violet      7
  1159.       Gray        8
  1160.       White       9
  1161.  
  1162. %     ╒═████░██▒██▓██░██▒████═╕
  1163. %     ┴                       ┴
  1164.             │  │  │  │  │
  1165.             │  │  │  └──┴─────── tolerance/temperature dependance
  1166.             │  │  └─────────── picofarad value multiplier
  1167.             └──┴──────────── first 2 digits of picofarad value
  1168. :cmos ram:cmos clock:rtc
  1169. ^CMOS RTC - Real Time Clock and Memory (ports 70h & 71h)
  1170.  
  1171. %Reg#                      Description
  1172.  
  1173.   00  RTC seconds
  1174.   01  RTC seconds alarm
  1175.   02  RTC minutes
  1176.   03  RTC minutes alarm
  1177.   04  RTC hours
  1178.   05  RTC hours alarm
  1179.   06  RTC day of week
  1180.   07  RTC day of month
  1181.   08  RTC month
  1182.   09  RTC year
  1183.   0A  RTC Status register A:
  1184.  
  1185.      │7│6│5│4│3│2│1│0│  RTC Status Register A
  1186.       │ │ │ │ └─┴─┴─┴──── rate selection Bits for divider output
  1187.       │ │ │ │             frequency (set to 0110 = 1.024kHz, 976.562µs)
  1188.       │ └─┴─┴────────── 22 stage divider, time base being used;
  1189.       │                 (initialized to 010 = 32.768kHz)
  1190.       └────────────── 1=time update in progress, 0=time/date available
  1191.   
  1192.   0B  RTC Status register B:
  1193.  
  1194.      │7│6│5│4│3│2│1│0│  RTC Status Register B
  1195.       │ │ │ │ │ │ │ └──── 1=enable daylight savings, 0=disable (default)
  1196.       │ │ │ │ │ │ └───── 1=24 hour mode, 0=12 hour mode (24 default)
  1197.       │ │ │ │ │ └────── 1=time/date in binary, 0=BCD (BCD default)
  1198.       │ │ │ │ └─────── 1=enable square wave frequency, 0=disable
  1199.       │ │ │ └──────── 1=enable update ended interrupt, 0=disable
  1200.       │ │ └───────── 1=enable alarm interrupt, 0=disable
  1201.       │ └────────── 1=enable periodic interrupt, 0=disable
  1202.       └─────────── 1=disable clock update, 0=update count normally
  1203.  
  1204.   0C  RTC Status register C (read only):
  1205.  
  1206.      │7│6│5│4│3│2│1│0│  RTC Status Register C  (read only)
  1207.       │ │ │ │ └─┴─┴─┴──── reserved (set to 0)
  1208.       │ │ │ └────────── update ended interrupt enabled
  1209.       │ │ └────────── alarm interrupt enabled
  1210.       │ └────────── periodic interrupt enabled
  1211.       └────────── IRQF flag
  1212.  
  1213.   0D  RTC Status register D (read only):
  1214.  
  1215.      │7│6-0│  RTC Status Register D  (read only)
  1216.       │  └───── reserved (set to 0)
  1217.       └────── 1=CMOS RAM has power, 0=CMOS RAM has lost power
  1218.  
  1219.   0E  Diagnostic status byte:
  1220.  
  1221.      │7│6│5│4│3│2│1│0│  Diagnostic Status Byte
  1222.       │ │ │ │ │ │ └─┴──── reserved
  1223.       │ │ │ │ │ └─────── 1=time is invalid, 0=ok (POST validity check)
  1224.       │ │ │ │ └──────── 1=fixed disk 0 failed initialization, 0=ok
  1225.       │ │ │ └───────── 1=memory size doesn't match config info, 0=ok
  1226.       │ │ └────────── 1=invalid config info found, 0=ok (see below)
  1227.       │ └─────────── 1=config record checksum is bad, 0=ok
  1228.       └──────────── 1=RTC lost power, 0=power state stable
  1229.       
  1230.   0F  Shutdown status byte:
  1231.  
  1232.         0  soft reset or unexpected shutdown
  1233.         1  shut down after memory size determination
  1234.         2  shut down after memory test
  1235.         3  shut down with memory error
  1236.         4  shut down with boot loader request
  1237.         5  JMP DWORD request with INT init
  1238.         6  protected mode test 7 passed
  1239.         7  protected mode test 7 failed
  1240.         8  protected mode test1 failed
  1241.         9  block move shutdown request
  1242.         A  JMP DWORD request without INT init
  1243.  
  1244.   10  Diskette drive type for A: and B:
  1245.       
  1246.      │7│6│5│4│3│2│1│0│  Diskette drive type for A: and B:
  1247.       │ │ │ │ └─┴─┴─┴──── second diskette type
  1248.       └─┴─┴─┴─────────── first diskette type
  1249.  
  1250.         0000  no drive installed
  1251.         0001  DSDD 48 TPI drive
  1252.         0010  DSQD 96 TPI drive
  1253.         other values are reserved
  1254.  
  1255.   11  Reserved
  1256.   12  Fixed disk drive type for drive 0 and drive 1
  1257.  
  1258.      │7│6│5│4│3│2│1│0│  Diskette drive type for A: and B:
  1259.       │ │ │ │ └─┴─┴─┴──── second hard disk drive code (0000=no disk)
  1260.       └─┴─┴─┴─────────── first hard disk drive code (0000=no disk)
  1261.  
  1262.   13  Reserved
  1263.   14  Equipment byte
  1264.  
  1265.      │7│6│5│4│3│2│1│0│  Equipment byte
  1266.       │ │ │ │ │ │ │ └──── 1=diskette drives installed, 0=none
  1267.       │ │ │ │ │ │ └───── 1=math coprocessor installed, 0=none
  1268.       │ │ │ │ └─┴────── unused
  1269.       │ │ └─┴─────── primary display
  1270.       └─┴────────── number of diskette drives installed
  1271.  
  1272. %    Bits                      Bits
  1273. %     54  Primary Display       76  Number of Drives
  1274.       00  reserved              00  1 diskette drive
  1275.       01  40 column color       01  2 diskette drives
  1276.       10  80 column color       10  reserved
  1277.       11  monochrome            11  reserved
  1278.  
  1279.   15  LSB of system base memory in 1k blocks
  1280.   16  MSB of system base memory in 1k blocks
  1281.   17  LSB of total extended memory in 1k blocks
  1282.   18  MSB of total extended memory in 1k blocks
  1283.   19  Drive C extension byte (reserved AT)
  1284.   1A  Drive D extension byte (reserved AT)
  1285.   1B  13 bytes reserved
  1286.   2E  CMOS checksum of bytes 10h-20h (MSB)
  1287.   2F  CMOS checksum of bytes 10h-20h (LSB)
  1288.   30  LSB of extended memory size found above 1 megabyte during POST
  1289.   31  MSB of extended memory size found above 1 megabyte during POST
  1290.   32  Date century byte in BCD ( BIOS interface to read and set)
  1291.   33  Information flags (set during power-on)
  1292.  
  1293.      │7│6│5-0│  Information Flags
  1294.       │ │  └───── reserved
  1295.       │ └─────── initial setup message flag
  1296.       └──────── 1=IBM 128k expansion installed, 0=none
  1297.  
  1298.   34  12 bytes reserved
  1299.  
  1300.  
  1301. %Programming Considerations:
  1302.  
  1303.  Write CMOS address to read or write to port 70h
  1304.  Read/write port 71h to get/set data
  1305.  
  1306.  
  1307.  - the information here is only applicable to AT and PS/2 systems
  1308.  - INT 1A is used to read/set the Time of Day and Alarm.  To use the
  1309.    alarm, INT 4A must be a valid interrupt service routine.
  1310.  - configuration settings are maintained using the Motorola MC146818
  1311.    Real Time Clock.  Each of this chips 64 memory registers is used
  1312.    for storage (0-3F).
  1313.  - Bit 5 of the diagnostic (0Eh) status byte is set during a power
  1314.    on test.  This Bit is set if no floppy disks are found or the
  1315.    display doesn't match the system display switch setting.
  1316.  - all addresses sent to port 70h have Bits 7&6 clear since Bit 7
  1317.    of port 70h is used to enable/disable NMI.  Setting this Bit 7
  1318.    enables NMI, clearing this Bit disables NMI.
  1319.  - when masking the NMI through using port 70H, port 71H should be
  1320.    read immediately after or the RTC may be left in an unknown state.
  1321.    This wont affect the PS/2 watchdog timer or system channel timeout.
  1322.  
  1323.  - see   INT 1A
  1324. :epson printer codes
  1325. ^Epson FX Printer Codes
  1326.  
  1327. %Printer Operation:
  1328. %Decimal      ASCII                  Description
  1329.   7           BEL          Beeper
  1330.  17           DC1          Select printer
  1331.  19           DC3          Deselect printer
  1332.  27 25 48     ESC EM 0     Turn cut sheet feeder control off
  1333.  27 25 52     ESC EM 4     Turn cut sheet feeder control on
  1334.  27 56        ESC 8        Disable paper out sensor
  1335.  27 57        ESC 9        Enable paper out sensor
  1336.  27 60        ESC <        Select unidirectional mode for one line
  1337.  27 64        ESC @        Initialize printer
  1338.  27 85 48     ESC U 0      Cancel unidirectional mode
  1339.  27 85 49     ESC U 1      Select unidirectional mode
  1340.  27 115 48    ESC s 0      Turn half speed mode off
  1341.  27 115 49    ESC s 1      Turn half speed mode on
  1342.  
  1343. %Vertical/Horizontal Motion:
  1344. %Decimal      ASCII                  Description
  1345.   8           BS           Backspace
  1346.   9           HT           Horizontal tab
  1347.  10           LF           Line Feed
  1348.  11           VT           Vertical Tab
  1349.  12           FF           Form Feed
  1350.  27 47 c      ESC / c      Select vertical tab channel (c=0..7)
  1351.  27 48        ESC 0        Select 8 lines per inch
  1352.  27 49        ESC 1        Select 7/72 inch line spacing
  1353.  27 50        ESC 2        Select 6 lines per inch
  1354.  27 51 n      ESC 3 n      Select n/216 inch line spacing (n=0..255)
  1355.  27 65 n      ESC A n      Select n/72 inch line spacing (n=0..85)
  1356.  27 66 0      ESC B NUL    Clear Vertical tabs
  1357.  27 66 tabs   ESC B tabs   Select up to 16 vertical tabs where tabs are
  1358.                            ascending values from 1..255 ending with NUL
  1359.  27 67 n      ESC C n      Select page length in lines (n=1..127)
  1360.  27 67 48 n   ESC C 0 n    Select page length in inches (n=1..22)
  1361.  27 68 0      ESC D NUL    Clears all horizontal tables
  1362.  27 68 tabs 0 ESC D tabs NUL  Sets up to 32 horizontal tabs with
  1363.                            ascending values 1-137.  NUL or a value
  1364.                            less than previous tab ends command.
  1365.  27 74 n      ESC J n      Immediate n/216 inch line feed (n=0..255)
  1366.  27 78 n      ESC N n      Select skip over perforation (n=1..127)
  1367.  27 79        ESC O        Cancel skip over perforation
  1368.  27 81 n      ESC Q n      Set right margin (n=column)
  1369.  27 98 b c 0  ESC b c NUL  Clear vertical tabs in channel (c=0..7)
  1370.  27 98 c tabs ESC b c tabs Select up to 16 vertical tabs in channels
  1371.                            (c=0..7) where tabs are ascending values
  1372.                            from 1..255 ending with NUL
  1373.  27 101 48 s  ESC e 0 s    Set horizontal tab to increments of 's'
  1374.  27 101 49 s  ESC e 1 s    Set vertical tab to increments of 's'
  1375.  27 102 48 s  ESC f 0 s    Set horizontal skip to increments of 's'
  1376.  27 102 49 s  ESC f 1 s    Set vertical skip to increments of 's'
  1377.  27 106 n     ESC j n      Reverse linefeed (n/216 inch after buffer)
  1378.  27 108 n     ESC l n      Set left margin (n=column)
  1379.  
  1380. %Printing Style:
  1381. %Decimal      ASCII                  Description
  1382.  27 33 n      ESC ! n      Master select where n is a combination of:
  1383.                              0  Pica              16  Double Strike
  1384.                              1  Elite             32  Double Wide
  1385.                              4  Condensed         64  Italic
  1386.                              8  Emphasized       128  Underline
  1387.                            Pica & Elite and Condensed/Emphasized are
  1388.                            mutually exclusive
  1389.  27 107 48    ESC k 0      Select NLQ Roman font
  1390.  27 107 49    ESC k 1      Select NLQ Sans Serif font
  1391.  27 120 48    ESC x 0      Select draft mode
  1392.  27 120 49    ESC x 1      Select NLQ mode
  1393.  
  1394. %Print Size and Character Width:
  1395. %Decimal     ASCII                  Description
  1396.  14          SO            Select double width for one line
  1397.  15          SI            Select condensed mode
  1398.  18          DC2           Cancel condensed mode
  1399.  20          DC4           Cancel one line double width mode
  1400.  27 14       ESC SO        Double width for one line (duplicate)
  1401.  27 15       ESC SI        Select condensed mode (duplicate)
  1402.  27 77       ESC M         Select elite width (12 cpi)
  1403.  27 80       ESC P         Select pica width (10 cpi)
  1404.  27 87 48    ESC W 0       Cancel double width mode
  1405.  27 87 49    ESC W 1       Select double width mode
  1406.  
  1407. %Print Enhancement:
  1408. %Decimal     ASCII                  Description
  1409.  27 45 48    ESC - 0       Cancel underlining
  1410.  27 45 49    ESC - 1       Select underlining
  1411.  27 69       ESC E         Select emphasized mode
  1412.  27 70       ESC F         Cancel emphasized mode
  1413.  27 71       ESC G         Select double strike mode
  1414.  27 72       ESC H         Cancel double strike mode
  1415.  27 83 48    ESC S 0       Select superscript
  1416.  27 83 49    ESC S 1       Select subscript
  1417.  27 84       ESC T         Cancel superscript/subscript
  1418.  
  1419. %Character Sets:
  1420. %Decimal     ASCII                  Description
  1421.  27 52       ESC 4         Select italic mode
  1422.  27 53       ESC 5         Cancel italic mode
  1423.  27 54       ESC 6         Enable printing of characters (128-159,255)
  1424.  27 55       ESC 7         Cancel [ESC 6] command
  1425.  27 82 n     ESC R n       Select International character set where
  1426.                            numeric 'n' is:
  1427.                              0  USA                7  Spain I
  1428.                              1  France             8  Japan
  1429.                              2  Germany            9  Norway
  1430.                              3  United Kingdom    10  Denmark II
  1431.                              4  Denmark I         11  Spain II
  1432.                              5  Sweden            12  Latin America
  1433.                              6  Italy
  1434.  27 116 0    ESC t NUL    Select italic character set
  1435.  27 116 1    ESC t SOH    Select Epson character set
  1436.  
  1437. %User Defined Characters:
  1438. %Decimal      ASCII                  Description
  1439.  27 37 0      ESC % NUL          Selects normal character set
  1440.  27 37 1      ESC % SOH          Selects user defined set
  1441.  27 38 0      ESC & NUL ?        Select user defined chars (see manual)
  1442.  27 58 0 0 0  ESC : NUL NUL NUL  Copy ROM into RAM
  1443.  
  1444. %Graphics Character Sets:
  1445. %Decimal        ASCII                  Description
  1446.  27 42 0 n1 n2  ESC * NUL n1 n2  Select single density graphics
  1447.  27 42 1 n1 n2  ESC * SOH n1 n2  Select double density graphics
  1448.  27 63 s n      ESC ? s n        Reassign graphics mode
  1449.                                  's'=(K,L,Y or Z) to mode 'n'=(0..6)
  1450.  27 75 n1 n2    ESC K n1 n2      Single density graphics (60 dpi)
  1451.  27 76 n1 n2    ESC L n1 n2      Double density graphics (120 dpi)
  1452.  27 89 n1 n2    ESC Y n1 n2      Hi-speed double den graphics (120 dpi)
  1453.  27 90 n1 n2    ESC Z n1 n2      Quad density graphics (240 dpi)
  1454.  27 94 m n1 n2  ESC ^ m n1 n2    Select 9 pin graphics mode
  1455.  
  1456.  number of columns = n1 + (n2 * 256)
  1457.  
  1458. %Other:
  1459. %Decimal      ASCII                  Description
  1460.   13          CR           Carriage Return
  1461.   24          CAN          Cancel text in line (but not control codes)
  1462.  127          DEL          Delete character (but not control codes)
  1463.   27 32 n     ESC SP n     Space in n/72 inch following each NLQ char
  1464.   27 35       ESC #        MSB control sequence cancel
  1465.   27 36       ESC $        Select absolute dot position
  1466.   27 61       ESC =        MSB = 0
  1467.   27 62       ESC >        MSB = 1
  1468.   27 73 48    ESC I 0      Cancel above [ESC I 1]
  1469.   27 73 49    ESC I 1      Printable codes expansion (0-31,128-159)
  1470.   27 92       ESC \        Select relative dot position
  1471.   27 97  n    ESC a n      NLQ justification where numeric 'n' is:
  1472.                              0  left justification  (default)
  1473.                              1  center
  1474.                              2  right justification
  1475.                              3  full justification
  1476.   27 112      ESC p        Select/cancel proportional mode
  1477.  
  1478.  
  1479.  - the codes listed are relative to the Epson LX 800
  1480.  - in several situations where a numeric value of zero or one is
  1481.    required, the ASCII value of the number can be substituted
  1482. :hard disks drives:drive specifications:disk drives:hard drives
  1483. ^Hard Drive Specifications
  1484.  
  1485. %                                       Avg      Miscellaneous
  1486. %Manufacturer          MB    Cyl  Hds Access      Information
  1487.  
  1488.  Alloy ID-160         125               30
  1489.  Atasi AT3020                635    3        Wedge servo
  1490.  Atasi AT3033                635    5        Wedge servo
  1491.  Atasi AT3046                635    7
  1492.  Atasi AT3051                703    7
  1493.  Atasi AT3085               1024    8
  1494.  Bull D530                   987    3
  1495.  Bull D550                   987    5
  1496.  Bull D570                   987    7
  1497.  Bull D585                   987    7
  1498.  Bull D530                  1166    3
  1499.  CDC Wren I 9415-21          697    3        STnnn, MFM, Voice coil
  1500.  CDC Wren I 9415-36          697    5        STnnn, MFM, Voice coil
  1501.  CDC Wren II 9415-25         615    4        STnnn, MFM, Voice coil
  1502.  CDC Wren II 9415-30         989    3        STnnn, MFM, Voice coil
  1503.  CDC Wren II 9415-38         733    5        STnnn, MFM, Voice coil
  1504.  CDC Wren II 9415-48         925    5        STnnn, MFM, Voice coil
  1505.  CDC Wren II 9415-51   42    989    5   28   STnnn, MFM, Voice coil
  1506.  CDC Wren II 9415-67         925    7        STnnn, MFM, Voice coil
  1507.  CDC Wren II 9415-86   69    925    9        STnnn, MFM, Voice coil
  1508.  CDC Wren II 9416-182 144    969    9        STnnn, MFM, Voice coil
  1509.  CDC Wren V           380          15   16   ESDI/SCSI
  1510.  CDC Wren V           702          15   16   ESDI/SCSI
  1511.  CDC Wren VI          766          15 16.5   ESDI/SCSI
  1512.  CDC Wren VII        1.2G          15 16.5   SCSI
  1513.  CMI CM3426                  612    4
  1514.  CMI CM5205                  256    4
  1515.  CMI CM5410                  256    4
  1516.  CMI CM5616                  256    4
  1517.  CMI CM6426                  615    4
  1518.  CMI CM6426S                 640    4
  1519.  CMI CM6640                  640    4
  1520.  CMS F40-K             42   1024    5   22   STnnn, MFM, Voice coil
  1521.  CMS F60-K             42   1024    7        STnnn, MFM, Voice coil
  1522.  CMS F70-K             42   1024    8        STnnn, MFM, Voice coil
  1523.  CMS F80-K             42   1024    9        STnnn, MFM, Voice coil
  1524.  Columbia SCSI         42    834    3   19   SCSI, RLL, Band stepper
  1525.  Core AT40F            40    564    4   10   ESDI, MFM, Voice coil
  1526.  Core AT43             43    988    5   20   STnnn, MFM, Voice coil
  1527.  Core HC150           150   1024+       18   ESDI
  1528.  Emerald DOS 150-3000 150   1024+            ESDI
  1529.  Emulex ATS-170       142   1022             SCSI & ESDI
  1530.  Emulex ATS-380       310   1222             SCSI & ESDI
  1531.  FlashCard 49          49    615    6   28   STnnn, RLL, Voice coil
  1532.  Fuji 302-13           10    612    2
  1533.  Fuji 302-26           20    612    4
  1534.  Fujitsu M2230AS             320    2
  1535.  Fujitsu M2233AS       10    320    4
  1536.  Fujitsu M2234AS             320    6
  1537.  Fujitsu M2235AS       21    320    8   56
  1538.  Fujitsu M2241AS             754    4
  1539.  Fujitsu M2242AS       43    754    7   33   STnnn, MFM, Voice coil
  1540.  Fujitsu M2243AS       72    754   11   33   STnnn, MFM, Voice coil
  1541.  Fujitsu M2263        778u         14   16   ESDI/SCSI
  1542.  Hitachi DK511-5             699    7
  1543.  Hitachi DK511-8             823   10
  1544.  Hitachi DK515C-78    780u          8   16   SCSI
  1545.  Hitachi DK515-78     780u          8   16   ESDI
  1546.  IMI 5006H                   306    2
  1547.  IMI 5012H                   306    4
  1548.  IMI 5018H                   306    6
  1549.  Irwin 416                   819    2
  1550.  Irwin 510                   628    2        HD/tape
  1551.  Irwin 516                   819    2        HD/tape
  1552.  Irwin 561                   180    4
  1553.  Kalok KL320           26u   615    4   40   STnnn, MFM, Band stepper
  1554.  Kalok KL330           38u   615    4   40   STnnn, RLL, Band stepper
  1555.  Maxtor XT1065         52    918    7   28   STnnn, Voice coil
  1556.  Maxtor XT1085         68   1024    8   28   STnnn, Voice coil
  1557.  Maxtor XT1105         83    918   11   28   STnnn, Voice coil
  1558.  Maxtor XT1140        112    918   15   28   STnnn, Voice coil
  1559.  Maxtor XT1190        150   1224        28   STnnn, Voice coil
  1560.  Maxtor XT2085              1224    7   28   STnnn, Voice coil
  1561.  Maxtor XT2140              1224   11        STnnn, Voice coil
  1562.  Maxtor XT2190        160   1224   15        STnnn, Voice coil
  1563.  Maxtor XT4170E       179u  1224    7   14   ESDI, MFM, Voice coil
  1564.  Maxtor XT4230E       231u  1224    9   16   ESDI, MFM, Voice coil
  1565.  Maxtor XT4380E       384u  1224   15   16   ESDI, MFM, Voice coil
  1566.  Maxtor XT4380S       384u  1224        16   SCSI, MFM, Voice coil
  1567.  Maxtor XT8380E       410u            14.5   ESDI
  1568.  Maxtor XT8380S       410u            14.5   SCSI
  1569.  Maxtor XT8760E       768u            16.5   ESDI
  1570.  Maxtor XT8760S       768u            16.5   SCSI
  1571.  Micropolis 1302             830    3
  1572.  Micropolis 1303             830    5
  1573.  Micropolis 1304             830    6
  1574.  Micropolis 1323            1024    4
  1575.  Micropolis 1323A           1024    5
  1576.  Micropolis 1324            1024    6
  1577.  Micropolis 1324A           1024    7
  1578.  Micropolis 1325            1024    8
  1579.  Micropolis 1333A      44   1024    5   28   STnnn, MFM, Voice coil
  1580.  Micropolis 1335       71   1024    8   30
  1581.  Micropolis 1355      142   1022
  1582.  Micropolis 1518     1.2Gu         15   14   ESDI
  1583.  Micropolis 1558      382u         15   18   ESDI
  1584.  Micropolis 1568      765u         15   16   ESDI
  1585.  Micropolis 1578      382u         15   18   SCSI
  1586.  Micropolis 1588      765u         15   16   SCSI
  1587.  Micropolis 1598     1.2Gu         15   14   SCSI
  1588.  Microscience HH312    10    306    4
  1589.  Microscience HH325    20    612    4
  1590.  Microscience HH612    10    306    4
  1591.  Microscience HH725    21    612    4        Band stepper
  1592.  Microscience HH1050   44   1024    5   28   STnnn, MFM, Voice coil
  1593.  Miniscribe 1006             306    2
  1594.  Miniscribe 1012             306    4
  1595.  Miniscribe 2006             306    2
  1596.  Miniscribe 3012       10    612    4
  1597.  Miniscribe 3053       44   1024    6   25   STnnn, MFM, Voice coil
  1598.  Miniscribe 3212       10    612    4
  1599.  Miniscribe 3412             306    4
  1600.  Miniscribe 3425       20    615    4
  1601.  Miniscribe 3438     31.2    615    4
  1602.  Miniscribe 3650       50u   809    6   61   STnnn, MFM, linear drive
  1603.  Miniscribe 3650F      50u   809    6   46   STnnn, MFM, linear drive
  1604.  Miniscribe 3675       75u   809    6   61   STnnn, MFM, linear drive
  1605.  Miniscribe 4010             480    2
  1606.  Miniscribe 4020             480    4
  1607.  Miniscribe 6032       26   1024    3
  1608.  Miniscribe 6053       43   1024    5
  1609.  Miniscribe 6085       71   1024    8
  1610.  Miniscribe 6128      104   1024    8
  1611.  Miniscribe 8051A      51u   745    4   28   STnnn, MFM, Voice coil
  1612.  Miniscribe 8212             615    2
  1613.  Miniscribe 8425             615    4
  1614.  Miniscribe 8438     31.2    615    4
  1615.  Miniscribe 9380E     382u  1224   15   16   ESDI, RLL, Voice coil
  1616.  Miniscribe 9380S     382u  1224   15   16   SCSI, RLL, Voice coil
  1617.  Miniscribe 9780E     781u         15   17   ESDI, Voice coil
  1618.  Mitsubisi MR535       42    981    6        STnnn, MFM, Voice coil
  1619.  NEC D5662            385u              18   ESDI
  1620.  NEC D5682            765u         18   16   ESDI
  1621.  NEC D5862            385u              18   SCSI
  1622.  NEC D5882            765u         18   16   SCSI
  1623.  NEC 5124                    310    4
  1624.  NEC 5126                    612    4
  1625.  NEC 5146                    615    8
  1626.  Newberry Penny 340          615    8
  1627.  Northgate Turbo       42    809    6   36   STnnn, RLL, Voice coil
  1628.  Plus Hardcard 40      42    612    4   40   STnnn, RLL, Voice coil
  1629.  Priam ID45ATD2        42   1166    5   20   STnnn, MFM, Voice coil
  1630.  Priam ID130          130   1224             STnnn
  1631.  Priam ID40                  987    5
  1632.  Priam ID60                  987    7
  1633.  Priam V130                  987    3        STnnn
  1634.  Priam V185                 1166    7
  1635.  Priam 638            382u         15   18   ESDI
  1636.  Priam 676            765u         15   14   ESDI
  1637.  Priam 738            382u         15   18   SCSI
  1638.  Priam 776            765u         15   14   SCSI
  1639.  Quadram Q520                512    4
  1640.  Quadram Q530                512    6
  1641.  Quadram Q540                512    8
  1642.  Rodime RO101                192    2
  1643.  Rodime RO102                192    4
  1644.  Rodime RO103                192    6
  1645.  Rodime RO104                192    8
  1646.  Rodime RO201                320    2
  1647.  Rodime RO202                320    4
  1648.  Rodime RO203                320    6
  1649.  Rodime RO204                320    8
  1650.  Rodime RO201E               640    2
  1651.  Rodime RO202E               640    4
  1652.  Rodime RO203E         33    640    6
  1653.  Rodime RO204E               640    8
  1654.  Rodime RO252          10    306    4
  1655.  Rodime RO352          10    306    4
  1656.  Rodime RO3055         45    872    7        STnnn, MFM, Voice coil
  1657.  RMS 503                     153    2
  1658.  RMS 506                     153    4
  1659.  RMS 512                     153    8
  1660.  Seagate ST125         21    615    4   28   STnnn, MFM, Band stepper
  1661.  Seagate ST125N        22    407    4        SCSI, RLL, Band stepper
  1662.  Seagate ST138         32    615    6   28   STnnn, MFM, Band stepper
  1663.  Seagate ST138N        31    615    4   28   SCSI, RLL, Band stepper
  1664.  Seagate ST138R        33    615    4   28   STnnn, RLL, Band stepper
  1665.  Seagate ST151         43    977    5        STnnn, MFM, Voice Coil
  1666.  Seagate ST157N        49    615    6   28   SCSI, RLL, Band stepper
  1667.  Seagate ST157R        49    615    6   28   STnnn, RLL, Voice Coil
  1668.  Seagate ST177N        61    921    5        SCSI, RLL, Voice Coil
  1669.  Seagate ST206               306    2        STnnn, MFM, Band stepper
  1670.  Seagate ST213         11    615    2        STnnn, MFM, Band stepper
  1671.  Seagate ST225         21    615    4   65   STnnn, MFM, Band stepper
  1672.  Seagate ST225N        21    615    4   65   SCSI, MFM, Band stepper
  1673.  Seagate ST225R        21    667    2        STnnn, RLL, Band stepper
  1674.  Seagate ST238R        31    615    4   65   STnnn, RLL, Band Stepper
  1675.  Seagate ST250R        42    667    4        STnnn, RLL, Band stepper
  1676.  Seagate ST251         42    820    6   40   STnnn, MFM, Band stepper
  1677.  Seagate ST251-1       43    820    6   28   STnnn, MFM, Band stepper
  1678.  Seagate ST251N0       43    820    4   40   SCSI, RLL, Band stepper
  1679.  Seagate ST251N1       43    630    4        SCSI, RLL, Band stepper
  1680.  Seagate ST251R        43    820    6   40   STnnn, RLL, Band stepper
  1681.  Seagate ST277         66    820    6        STnnn, MFM, Band stepper
  1682.  Seagate ST277N0       65    820    6   40   SCSI, RLL, Band stepper
  1683.  Seagate ST277N1       65    628    6        SCSI, RLL, Band stepper
  1684.  Seagate ST277R        65    820    6   40   STnnn, RLL, Band stepper
  1685.  Seagate ST296N        85    820    6        SCSI, RLL, Band stepper
  1686.  Seagate ST406          5    306    2        STnnn, MFM, Band stepper
  1687.  Seagate ST412         10    306    4        STnnn, MFM, Band stepper
  1688.  Seagate ST419         15    306    6        STnnn, MFM, Band stepper
  1689.  Seagate ST425         20    306    8        STnnn, MFM, Band stepper
  1690.  Seagate ST506          5    153    4        STnnn, MFM, Band stepper
  1691.  Seagate ST1096N       84    906    7        SCSI, RLL, Voice coil
  1692.  Seagate ST4026        21    615    4        STnnn, MFM, Voice coil
  1693.  Seagate ST4038        32    733    5   40   STnnn, MFM, Voice coil
  1694.  Seagate ST4051        43    977    5   40   STnnn, MFM, Voice coil
  1695.  Seagate ST4053        44   1024    5   28   STnnn, MFM, Voice coil
  1696.  Seagate ST4077R       65   1024    5   28   STnnn, MFM, Voice coil
  1697.  Seagate ST4096        80   1024    9   28   STnnn, MFM, Voice coil
  1698.  Seagate ST4144R      122   1024    9   28   STnnn, RLL, Voice coil
  1699.  Shugart SA 604              160    4
  1700.  Shugart SA 606              160    6
  1701.  Shugart SA 612              306    4
  1702.  Shugart SA 712              320    4
  1703.  SPC Scorecard 44      44    753    7        STnnn, MFM, Voice coil
  1704.  Syquest SQ306RD             306    2
  1705.  Syquest SQ312RD             615    2
  1706.  Syquest SQ325F              612    4
  1707.  Syquest SQ338F              612    6
  1708.  Tandon TM252          10    306    4
  1709.  Tandon TM262          20    615    4
  1710.  Tandon TAN501               306    2
  1711.  Tandon TAN502               306    4
  1712.  Tandon TAN503               306    6
  1713.  Tandon TM602S               153    4
  1714.  Tandon TM603S               153    6
  1715.  Tandon TM603SE              230    6
  1716.  Tandon TM702AT              615    4
  1717.  Tandon TM703                695    5
  1718.  Tandon TM703AT              733    5
  1719.  Tandon TM755                981    5
  1720.  Tandy SCSI            80    823    6   28   SCSI, RLL, Band stepper
  1721.  Toshiba MK53F               830    5
  1722.  Toshiba MK54F         49    830    7   25   STnnn, MFM, Voice coil
  1723.  Toshiba MK56F         72    830   10   25
  1724.  Toshiba MK134FA             733    7   25   STnnn
  1725.  Toshiba MK358FA      765u         15   16   ESDI
  1726.  Toshiba MK358FB      765u         15   16   SCSI
  1727.  Tulin 226                   640    4
  1728.  Tulin 240                   640    6
  1729.  Tulin 326             20    640    4
  1730.  Tulin 340             30    640    6
  1731.  Western Dig. 93024A  21.6              28   STnnn, MFM
  1732.  Western Dig. 93024X  21.6              39   STnnn, MFM
  1733.  Western Dig. 93028A  21.6              69   STnnn, MFM
  1734.  Western Dig. 93028X  21.6              70   STnnn, MFM
  1735.  Western Dig. 93034X  32.4              39   STnnn, MFM
  1736.  Western Dig. 93038X  32.4              70   STnnn, MFM
  1737.  Western Dig. 93044A  43.2              28   STnnn, MFM
  1738.  Western Dig. 93044X  43.2              39   STnnn, MFM
  1739.  Western Dig. 93048A  43.2              69   STnnn, MFM
  1740.  Western Dig. 93048X  43.2              70   STnnn, MFM
  1741.  Western Dig. AC140   42.5              19   STnnn, MFM
  1742.  Western Dig. AC280   85.1              19   STnnn, MFM
  1743.  
  1744.  
  1745.  - STnnn indicates Seagate ST412/ST506 compatible
  1746.  - 'u' in filesize indicates unformatted spec
  1747.  - formatted capacity is related to BIOS and my vary with different
  1748.    BIOS and OEM versions
  1749.  - read/write heads should normally never touch hard disk media
  1750.  - Standard AT hard disk controllers do not use DMA for disk I/O due
  1751.    to the slow speed of the 8 Bit DMA chips used.  Port I/O is used
  1752.    instead for an actual increase in performance.
  1753.  - DOS version and disk size determine cluster size.   DOS 2.x always
  1754.    has cluster size of 8K, while DOS 3.x+ has variable cluster sizes:
  1755.  
  1756.      2 - 16  Mb partitions have a cluster size of 8K
  1757.     16 - 128 Mb partitions have a cluster size of 2K
  1758.    128 - 256 Mb partitions have a cluster size of 4K
  1759.    256 - 512 Mb partitions have a cluster size of 8K
  1760.  
  1761. :hayes modem info:modem commands
  1762. ^Hayes Command Set / Register Formats
  1763.  
  1764.  +++    standard escape sequence (see S2 below)
  1765.  Comma  standard pause character (see S8 below)
  1766.  AT     standard attention sequence
  1767.  
  1768.  ATA    force immediate answer
  1769.  ATC0   transmitter off
  1770.  ATC1   transmitter on
  1771.  
  1772.  ATD    dial (ATD number)
  1773.  ATDP   pulse dial (ATDP number)
  1774.  ATDT   tone dial (ATDT number)
  1775.  
  1776.  ATE0   disable local character echo
  1777.  ATE1   enable local character echo
  1778.  ATF0   Half Duplex (modem echoes characters)
  1779.  ATF1   Full Duplex (modem does not echo characters)
  1780.  
  1781.  ATH0   force line on hook
  1782.  ATH1   force line off hook
  1783.  ATH2   force line special off hook (used for HAM radio)
  1784.  
  1785.  ATI0   request product code, formatted PPR, PP=prod., R=rev.
  1786.  ATI1   request ROM check sum
  1787.  
  1788.  ATL1   speaker volume low  (modem specific)
  1789.  ATL2   speaker volume medium  (modem specific)
  1790.  ATL3   speaker volume high  (modem specific)
  1791.  ATM0   speaker always off
  1792.  ATM1   speaker on except while carrier present
  1793.  ATM2   speaker always on
  1794.  ATM3   speaker on except while dialing and carrier present
  1795.  
  1796.  ATO    force modem into on-line state
  1797.  ATP    sets modem to default pulse dial
  1798.  
  1799.  ATQ0   modem returns result codes
  1800.  ATQ1   modem does not return result codes
  1801.  
  1802.  ATR    sets modem to answer mode after dialing out
  1803.  ATSn   where Sn is S register number 'n' (see registers below)
  1804.  ATT    sets modem to default tone dial
  1805.  
  1806.  ATV0   send numeric codes
  1807.  ATV1   send word result codes
  1808.  
  1809.  ATX0   basic result code set "CONNECT", no dial tone detect
  1810.  ATX1   extended result code set "CONNECT 1200", no dialtone detect
  1811.  ATX2   wait for dial tone, extended result codes
  1812.  ATX3   detect busy signal, extended result codes
  1813.  ATX4   wait for dial tone, detect busy, extended result codes
  1814.  
  1815.  ATZ    reset to power up condition
  1816.  
  1817. ^Hayes 2400 Compatible Modem Commands
  1818.  
  1819.  ATB0    CCITT V.22 at 1200 bps
  1820.  ATB1    BELL 212A at 1200 bps
  1821.  
  1822.  AT&C    DCD always on
  1823.  AT&C1   DCD on while carrier present
  1824.  
  1825.  AT&D    DTR ignored
  1826.  AT&D1   DTR fail disconnect enabled
  1827.  AT&D2   DTR fail disconnect enabled (auto answer off)
  1828.  AT&D3   DTR fail disconnect enabled (reset modem)
  1829.  
  1830.  AT&F    restore to factory configuration
  1831.  
  1832.  AT&G    no guard tone
  1833.  AT&G1   550 Hz guard tone
  1834.  AT&G2   1800 Hz guard tone
  1835.  
  1836.  AT&J    RJ11/RJ41S/RJ45 jack
  1837.  AT&J2   RJ12/RJ13 jack
  1838.  
  1839.  AT&L    regular phone line
  1840.  AT&L1   leased line
  1841.  
  1842.  AT&M    async operation
  1843.  AT&M1   async/sync operation
  1844.  AT&M2   sync auto dial
  1845.  AT&M3   sync manual dial
  1846.  
  1847.  AT&P    39/61 pulse make/break ratio
  1848.  AT&P1   33/67 pulse make/break ratio
  1849.  
  1850.  AT&T4   grant RDL test request
  1851.  AT&T5   deny RDL test request
  1852.  
  1853.  AT&W    write current registers to non-volatile memory
  1854.  
  1855.  AT&X    sync clock internal
  1856.  
  1857.  AT&X1   sync clock external
  1858.  AT&X2   sync clock slaved
  1859.  
  1860.  AT&Z    store dial command line
  1861.  
  1862. ^Hayes Compatible Modem Registers
  1863.  
  1864.  Not all modems support all of these registers and some modems have
  1865.  registers other than those listed here.  Also note, some are read only.
  1866.  
  1867.  to set a register use:         AT Sr=##  (cr)
  1868.  to read the register:          AT Sr?    (cr)
  1869.  
  1870.  Where "r" is the register and (cr) is a carriage return
  1871.  
  1872.  
  1873. %The following represent conventions used in the tables below:
  1874.  
  1875.  () indicates defaults for Smartmodem 1200
  1876.  ** indicates possible inconsistencies across modems
  1877.  
  1878.  
  1879. %Reg  Values        Register function
  1880.  
  1881.  S0   0-255    ring to answer on (0=don't answer)
  1882.  S1   0-255    ring count (clear after 8 sec) (read only)
  1883.  S2   0-255    escape char, normally "+", 128-255 disable escape
  1884.  S3   0-127    end of line character (0x0D/CR)
  1885.  S4   0-127    line feed character (0x0A/LF)
  1886.  S5   0-32,127 backspace character (0x08/BS)
  1887.  S6   2-255    pause before dialing in seconds (2)
  1888.  S7   1-255    wait for carrier in seconds (30)
  1889.  S8   0-255    pause for comma in dial string in seconds (2)
  1890.  S9   1-255    carrier detect response time in 1/10 second (6)
  1891.  S10  1-255    carrier loss delay in 1/10 second, 255=ignore CD (7)
  1892.  S11 50-255    touch tone dial speed, in milliseconds (70)
  1893.  S12 20-255    escape guard time, in 1/50 second,0=no delay (50)
  1894.  
  1895.  │7│6│5│4│3│2│1│0│  S13   power up async data format
  1896.   │ │ │ │ │ │ │ └──── unused
  1897.   │ │ │ │ │ │ └───── result code, 0=basic, 1=extended
  1898.   │ │ │ │ │ └────── parity, 0=disabled, 1=enabled
  1899.   │ │ │ │ └─────── parity, 0=odd ,1=even
  1900.   │ │ │ └──────── data bits, 0=7 bits, 1=8 bits
  1901.   │ │ └───────── undefined
  1902.   │ └────────── buffer ovfw flag, 0=disabled,1=enabled
  1903.   └─────────── 8th bit, 0=space,1=mark (8 bit only)
  1904.  
  1905.  │7│6│5│4│3│2│1│0│  S14   option register status data format
  1906.   │ │ │ │ │ │ │ └──── unused **
  1907.   │ │ │ │ │ │ └───── local echo, 0=disabled, 1=enabled
  1908.   │ │ │ │ │ └────── result codes, 0=enabled,1=disabled
  1909.   │ │ │ │ └─────── result codes, 0=numeric,1=word
  1910.   │ │ │ └──────── command recognition, 0=enable,1=disable
  1911.   │ │ └───────── dial method, 0=touch tone, 1=pulse
  1912.   │ └────────── unused **
  1913.   └─────────── 0=answer, 1=originate **
  1914.  
  1915.  S15           flag register **
  1916.  
  1917.  │7│6│5│4│3│2│1│0│  S16   test status
  1918.   │ │ │ │ │ │ │ └──── analog loop, 0=inactive, 1=active
  1919.   │ │ │ │ │ │ └───── unused
  1920.   │ │ │ │ │ └────── digital loop, 0=inactive, 1=active
  1921.   │ │ │ │ └─────── remote req digital loop,0=inact.,1=active
  1922.   │ │ │ └──────── remote digital loop,0=inact.,1=active
  1923.   │ │ └───────── self test RDL, 0=inactive, 1=active
  1924.   │ └────────── self test analog loop,0=inactive,1=active
  1925.   └─────────── unused
  1926.  
  1927.  S18 0-255     remote test timer in seconds
  1928.  
  1929.  │7│6│5│4│3│2│1│0│  S21   option status
  1930.   │ │ │ │ │ │ │ └──── jack type, 0=RJ11,RJ41,RJ45,1=RJ12,RJ13
  1931.   │ │ │ │ │ │ └───── unused
  1932.   │ │ │ │ │ └────── CTS state,  0=follows RTS, 1=forced on
  1933.   │ │ │ └─┴─────── DTR modem behavior (see below)
  1934.   │ │ └────────── DCD, 0=forced on, 1=follows carrier
  1935.   │ └─────────── DSR, 0=forced on, 1=behaves normally
  1936.   └──────────── long space disconnect,0=disabled,1=enabled
  1937.  
  1938. %Bits
  1939. % 43  DTR Modem Behavior Bits
  1940.   00  ignore DTR
  1941.   01  assume command state when DTR drops
  1942.   10  assume command state and disable auto-answer when DTR drops
  1943.   11  reset when DTR drops
  1944.  
  1945.  
  1946.  │7│6│5│4│3│2│1│0│  S22   option status
  1947.   │ │ │ │ │ │ └─┴──── speaker volume, 01=low,10=med,11=high
  1948.   │ │ │ │ └─┴─────── speaker setting (see below)
  1949.   │ └─┴─┴────────── X command in effect
  1950.   └─────────────── make/break ratio, 0=39/61, 1=33/67
  1951.  
  1952. %Bits
  1953. % 32  S22 Speaker Setting
  1954.   00  speaker always off
  1955.   01  speaker on until carrier detected
  1956.   10  speaker always on
  1957.   11  speaker off during dialing, then on until CD
  1958.  
  1959. %Bits
  1960. %654  S22 X Command in Effect
  1961.  100  X1 command in effect
  1962.  101  X2 command in effect
  1963.  110  X3 command in effect
  1964.  111  X4 command in effect
  1965.  
  1966.  
  1967.  │7│6│5│4│3│2│1│0│  S23   option status
  1968.   │ │ │ │ │ │ │ └──── remote dig.loop request,0=denied,1=ok
  1969.   │ │ │ │ │ └─┴───── baud rate (see table)
  1970.   │ │ │ │ └──────── unused
  1971.   │ │ └─┴───────── parity (see table)
  1972.   └─┴──────────── guard tone setting
  1973.  
  1974. %Bits
  1975. % 21  S23 Baud Rate Table
  1976.   00  0-300 bps
  1977.   01  600 bps
  1978.   10  1200 bps
  1979.   11  2400 bps
  1980.  
  1981. %Bits
  1982. % 54  S23 Parity Setting
  1983.   00  even parity
  1984.   01  parity bit always 0
  1985.   10  odd parity
  1986.   11  parity bit always 1
  1987.  
  1988. %Bits
  1989. % 76  S23 Guard Tone Setting
  1990.   00  no guard tones
  1991.   01  550 hz guard tone
  1992.   10  1800 hz guard tone
  1993.  
  1994.  S25 0-255     DTR detect delay in seconds (5)
  1995.  S26 0-255     RTS to CTS delay in milliseconds (1)
  1996.  
  1997.  │7│6│5│4│3│2│1│0│  S27   option status
  1998.   │ │ │ │ │ │ └─┴──── synch/async mode (see table)
  1999.   │ │ │ │ │ └─────── phone line, 0= public, 1=leased
  2000.   │ │ │ │ └──────── unused
  2001.   │ │ └─┴───────── clock type (see table)
  2002.   │ └──────────── protocol, 0=CCITT V.22, 1=Bell 212A
  2003.   └───────────── unused
  2004.  
  2005. %Bits
  2006. % 10  S27 Sync/Async mode
  2007.   00  asynchronous mode
  2008.   01  async/sync mode
  2009.   10  sync auto-dial
  2010.   11  sync manual dial
  2011.  
  2012. %Bits
  2013. % 45  S27 Clock Type
  2014.   00  internal clock used
  2015.   01  external clock used
  2016.   10  slaved clock used
  2017. :game port:joystick
  2018. ^Joystick / Game Port (201h)
  2019.  
  2020.  │7│6│5│4│3│2│1│0│  Port at 201h used with Joysticks
  2021.   │ │ │ │ │ │ │ └──── joystick a, x coord (0 = timing active)
  2022.   │ │ │ │ │ │ └───── joystick a, y coord (0 = timing active)
  2023.   │ │ │ │ │ └────── joystick b, x coord (0 = timing active)
  2024.   │ │ │ │ └─────── joystick b, y coord (0 = timing active)
  2025.   │ │ │ └──────── joystick a, button 1 (0=pressed)
  2026.   │ │ └───────── joystick a, button 2 (0=pressed)
  2027.   │ └────────── joystick b, button 1 (0=pressed)
  2028.   └─────────── joystick b, button 2 (0=pressed)
  2029.  
  2030.  │7│6│5│4│3│2│1│0│  Port at 201h used with Paddles
  2031.   │ │ │ │ │ │ │ └──── paddle a coord (0 = timing active)
  2032.   │ │ │ │ │ │ └───── paddle b coord (0 = timing active)
  2033.   │ │ │ │ │ └────── paddle c coord (0 = timing active)
  2034.   │ │ │ │ └─────── paddle d coord (0 = timing active)
  2035.   │ │ │ └──────── paddle a, button (0=pressed)
  2036.   │ │ └───────── paddle b, button (0=pressed)
  2037.   │ └────────── paddle c, button (0=pressed)
  2038.   └─────────── paddle d, button (0=pressed)
  2039.  
  2040.  
  2041.  - accessed through port 201h
  2042.  - bits 3-0 are resistive inputs with the length of the pulse
  2043.    determined by 0-100K ohm resistive load.   Use this formula:
  2044.  
  2045. %time = 24.2µ + ( 0.011µ * resistance )
  2046.  or
  2047. %resistance = ( time - 24.2 ) / 0.011
  2048.  
  2049.  
  2050.  - a read should be immediately preceded by a write (any data)
  2051.    to start timing for the resistive values.
  2052. :laserjet:hp laserjet
  2053. ^Hewlett Packard Laserjet Printer Control Codes
  2054.  
  2055. %Printer Control and Orientation
  2056.  ESC E           Reset printer
  2057.  ESC z           Self Test
  2058.  ESC &l0O        Portrait orientation
  2059.  ESC &l1O        Landscape orientation
  2060.  ESC (s0P        Select fixed space font
  2061.  ESC (s1P        Select proportional font
  2062.  ESC (s0S        Set upright character orientation
  2063.  ESC (s1S        Set Italic character orientation
  2064.  ESC &l#X        Select '#' number of copies
  2065.  ESC &l0H        Eject page
  2066.  ESC &l1H        Feed paper from tray
  2067.  ESC &l2H        Feed paper manually
  2068.  ESC &l3H        Feed envelope
  2069.  ESC &l0T        Default stacking position
  2070.  ESC &l1T        Togglestacking position
  2071.  
  2072. %8 Bit Symbol Set Selection
  2073.  ESC (8U         Select Roman 8 symbol set
  2074.  ESC (8K         Select Kana 8 symbol set
  2075.  ESC (8M         Select Math 8 symbol set
  2076.  
  2077. %7 Bit Symbol Set Selection
  2078.  ESC (0U         Select USASCII symbol set
  2079.  ESC (0B         Select Line Draw symbol set
  2080.  ESC (0A         Select Math symbol set
  2081.  ESC (0M         Select Math 7 symbol set
  2082.  ESC (0Q         Select Math 8a symbol set
  2083.  ESC (1Q         Select Math 8b symbol set
  2084.  ESC (1U         Select US Legal symbol set
  2085.  ESC (0E         Select Roman Extension symbol set
  2086.  ESC (0D         Select ISO Denmark/Norway symbol set
  2087.  ESC (1E         Select ISO United Kingdom symbol set
  2088.  ESC (0F         Select ISO France symbol set
  2089.  ESC (0G         Select ISO German symbol set
  2090.  ESC (0I         Select ISO Italy symbol set
  2091.  ESC (0S         Select ISO Sweden/Finland symbol set
  2092.  ESC (1S         Select ISO Spain symbol set
  2093.  ESC (15U        Select PiFont symbol set
  2094.  ESC (2Q         Select PiFonta symbol set
  2095.  
  2096. %Font Management
  2097.  ESC (s3T         Select Courier font
  2098.  ESC (s0T         Select Line Printer font
  2099.  ESC (s1T         Select Pica font
  2100.  ESC (s2T         Select Elite font
  2101.  ESC (s4T         Select Helvetica font
  2102.  ESC (s5T         Select Times Roman (TMS RMN) font
  2103.  ESC (s6T         Select Gothic font
  2104.  ESC (s7T         Select Script font
  2105.  ESC (s8T         Select Prestige font
  2106.  ESC *c#D         Specify font ID '#'
  2107.  ESC *c#E         Specify character code '#'
  2108.  ESC *c0F         Delete all fonts, including permanent
  2109.  ESC *c1F         Delete all temporary fonts
  2110.  ESC *c2F         Delete last font ID specified
  2111.  ESC *c3F         Delete last character code and font ID specified
  2112.  ESC *c4F         Make last font ID temporary
  2113.  ESC *c5F         Make last font ID permanent
  2114.  ESC *c6F         Copy or assign last font ID specified
  2115.  ESC *c7F         Reestablish ROM
  2116.  ESC *c8F         Set primary font
  2117.  ESC *c9F         Set secondary font
  2118.  ESC *c10F        Set primary and secondary font default
  2119.  ESC )s#W <data>  Create font header
  2120.  ESC (s#W <data>  Download character
  2121.  ESC (#X <data>   Designate downloaded font as primary
  2122.  ESC )#X <data>   Designate downloaded font as secondary
  2123.  ESC (#@          Primary font default (see printer manual)
  2124.  ESC )#@          Secondary font default(see printer manual)
  2125.  
  2126. %Pitch and Point Selection
  2127.  ESC (s10H       Set 10 pitch
  2128.  ESC (s12H       Set 12 pitch
  2129.  ESC (s16.6H     Set 16.66 pitch
  2130.  
  2131.  ESC (s7V        Set point size to 7
  2132.  ESC (s8V        Set point size to 8
  2133.  ESC (s8.5V      Set point size to 8.5
  2134.  ESC (s10V       Set point size to 10
  2135.  ESC (s12V       Set point size to 12
  2136.  ESC (s14.4V     Set point size to 14.4
  2137.  
  2138. %Page Dimensions
  2139.  ESC &l#P        Set page length to '#' lines
  2140.  ESC &l#E        Set top margin to '#' lines
  2141.  ESC &l#F        Set text length to '#' lines
  2142.  ESC 9           Clear margins
  2143.  ESC &a#L        Set left margin to column '#'
  2144.  ESC &a#M        Set right margin to column '#'
  2145.  ESC &l#C        Set vertical motion index to '#' 1/48" increments
  2146.  ESC &l#D        Set lines per inch to '#', valid values are:
  2147.                  1, 2, 3, 4, 6, 8, 12, 16 or 24
  2148.  ESC &k#H        Set horizontal motion index where # is derived
  2149.                  using   # = (120.0 / cpi)     (1/10 precision)
  2150.  
  2151. %Cursor Positioning
  2152.  ESC &a#R        Move to row '#'
  2153.  ESC &a#C        Move to col '#'
  2154.  ESC &a#H        Move to horizontal position '#' in decipoints
  2155.  ESC &a#V        Move to vertical position '#' in decipoints
  2156.  ESC *p#X        Move to horizontal position '#' in dots
  2157.  ESC *p#Y        Move to vertical position '#' in dots
  2158.  ESC &f0S        Push cursor position
  2159.  ESC &f1         Pop cursor position
  2160.  
  2161. %Raster Graphics
  2162.  ESC *t75R         Select 75 dots per inch graphics mode
  2163.  ESC *t100R        Select 100 dots per inch graphics mode
  2164.  ESC *t150R        Select 150 dots per inch graphics mode
  2165.  ESC *t300R        Select 300 dots per inch graphics mode
  2166.  ESC *r0A          Start graphics at left most position
  2167.  ESC *r1A          Start graphics at current cursor
  2168.  ESC *b#W <data>   Transfer '#' byte raster image as stream "<data>"
  2169.  ESC *rB           End graphics
  2170.  
  2171. %Advanced Graphics
  2172.  ESC *c#A          Set horizontal rule/pattern size in dots
  2173.  ESC *c#H          Set horizontal rule/pattern size in decipoints
  2174.  ESC *c#B          Set vertical rule/pattern size in dots
  2175.  ESC *c#V          Set vertical rule/pattern size in decipoints
  2176.  ESC *c0P          Select black rule
  2177.  ESC *c2P          Select gray scale pattern
  2178.  ESC *c3P          Select HP-Defined pattern
  2179.  ESC *c#G          Set grey scale pattern, where # is a value between
  2180.                    [0..6] for HP defined patterns and [0..100] to
  2181.                    specify percentage gray scaling.  The mode depends
  2182.                    on the rule/pattern selected using ESC *c?P
  2183.  ESC *c1G          Vertical lines pattern
  2184.  ESC *c2G          Horizontal lines pattern
  2185.  ESC *c3G          Diagonal lines pattern (upward left to right)
  2186.  ESC *c4G          Diagonal lines pattern (downward left to right)
  2187.  ESC *c5G          Horizontal/vertical grid lines pattern
  2188.  ESC *c6G          Diagonal grid pattern
  2189.  ESC *c#G          Set gray scaling to '#' percent
  2190.  
  2191. %Macro commands
  2192.  ESC &f#Y          Identify macro as ID "#'
  2193.  ESC &f0X          Start macro definition
  2194.  ESC &f1X          Stop macro definition
  2195.  ESC &f2X          Execute macro 
  2196.  ESC &f3X          Call macro
  2197.  ESC &f4X          Enable auto macro overlay
  2198.  ESC &f5X          Disable auto macro overlay
  2199.  ESC &f6X          Delete all macros
  2200.  ESC &f7X          Delete all temporary macros
  2201.  ESC &f8X          Delete macro ID
  2202.  ESC &f9X          Make macro temporary
  2203.  ESC &f10X         Make macro permanent
  2204.  
  2205. %Miscellaneous
  2206.  ESC (s#B          Set stroke weight '#'=(7..-7), 7=bold, -7=light
  2207.  ESC &dD           Set underline on
  2208.  ESC &d@           Set underline off
  2209.  ESC =             Half line feed
  2210.  ESC Y             Turn display functions mode on
  2211.  ESC Z             Turn display functions mode off (default)
  2212.  ESC &p#X <data>   Disable command interpretation for the '#' bytes
  2213.                    following this command
  2214.  ESC &l0L          Disable perforation skip
  2215.  ESC &l1L          Enable perforation skip
  2216.  ESC &k0G          Set line terminators to CR=CR, LF=LF, FF=FF
  2217.  ESC &k1G          Set line terminators to CR=CR+LF, LF=LF, FF=FF
  2218.  ESC &k2G          Set line terminators to CR=CR, LF=CR+LF, FF=CR+FF
  2219.  ESC &k3G          Set line terminators to CR=CR+LF, LF=CR+LF, FF=CR+FF
  2220.  ESC &s0C          Enable end of line wrap
  2221.  ESC &s1C          Disable end of line wrap
  2222.  
  2223.  
  2224. %Escape sequence combination rules:
  2225.  
  2226.   1. The first 2 characters following the ESC must be the same.
  2227.   2. The final character in any sequence other than the last must be
  2228.      changed to lower case.
  2229.   3. The last character in the complete sequence must be changed to
  2230.      upper case.
  2231.   4. Escape sequences must be specified in the order in which they
  2232.      should be performed.
  2233.  
  2234.  
  2235.  - the space following ESC is not included in the string
  2236. :keyboard commands
  2237. ^Keyboard Commands & Responses
  2238.  
  2239. ^Commands System Issues to Keyboard (via 8042 port 60h)
  2240.  
  2241.  ED  Set/Reset Mode Indicators, keyboard responds with ACK then
  2242.      waits for a following option byte.  When the option byte is
  2243.      received the keyboard again ACK's and then sets the LED's
  2244.      accordingly.  Scanning is resumed if scanning was enabled.
  2245.      If another command is received instead of the option byte
  2246.      (high bit set on) this command is terminated.  Hardware
  2247.      defaults to these indicators turned off.
  2248.  
  2249.      │7-3│2│1│0│ Keyboard Status Indicator Option Byte
  2250.        │  │ │ └─── Scroll-Lock indicator  (0=off, 1=on)
  2251.        │  │ └──── Num-Lock indicator  (0=off, 1=on)
  2252.        │  └───── Caps-Lock indicator  (0=off, 1=on)
  2253.        └─────── reserved (must be zero)
  2254.  
  2255.  EE  Diagnostic Echo, keyboard echoes the EE byte back to the system
  2256.      without an acknowledgement.
  2257.  F0  PS/2 Select/Read Alternate Scan Code Sets, instructs keyboard
  2258.      to use one of the three make/break scan code sets.   Keyboard
  2259.      responds by clearing the output buffer/typematic key and then
  2260.      transmits an ACK.  The system must follow up by sending an
  2261.      option byte which will again be ACK'ed by the keyboard:
  2262.  
  2263.        00  return byte indicating scan code set in use
  2264.        01  select scan code set 1  (used on PC & XT)
  2265.        02  select scan code set 2
  2266.        03  select scan code set 3
  2267.  
  2268.  F2  PS/2 Read Keyboard ID, keyboard responds with an ACK and a two
  2269.      byte keyboard ID of 83AB.
  2270.  F3  Set Typematic Rate/Delay, keyboard responds with ACK and waits
  2271.      for rate/delay byte.   Upon receipt of the rate/delay byte the
  2272.      keyboard responds with an ACK, then sets the new typematic
  2273.      values and scanning continues if scanning was enabled.
  2274.      
  2275.      │7│6│5│4│3│2│1│0│  Typematic Rate/Delay Option Byte
  2276.       │ │ │ ├─┼─┼─┼─┼──── typematic rate indicator (see INT 16,3)
  2277.       │ │ │ │ │ └─┴─┴─── A in period formula (see below)
  2278.       │ │ │ └─┴──────── B is period formula (see below)
  2279.       │ └─┴─────────── typematic delay
  2280.       └────────────── always zero
  2281.  
  2282.      delay = (rate+1) * 250   (in milliseconds)
  2283.      rate = (8+A) * (2**B) * 4.17  (in seconds, ± 20%)
  2284.  
  2285.      Defaults to 10.9 characters per second and a 500ms delay.  If a
  2286.      command byte (byte with high bit set) is received instead of an
  2287.      option byte this command is cancelled.
  2288.  F4  Enable Keyboard, cause the keyboard to clear its output buffer
  2289.      and last typematic key and then respond with an ACK.  The
  2290.      keyboard then begins scanning.
  2291.  F5  Default w/Disable, resets keyboard to power-on condition by
  2292.      clearing the output buffer, resetting typematic rate/delay,
  2293.      resetting last typematic key and setting default key types.
  2294.      The keyboard responds with an ACK and waits for the next
  2295.      instruction.
  2296.  F6  Set Default, resets to power-on condition by clearing the output
  2297.      buffer, resetting typematic rate/delay and last typematic key
  2298.      and sets default key types.  The keyboard responds with an ACK
  2299.      and continues scanning.
  2300.  F7  PS/2 Set All Keys to Typematic, keyboard responds by sending an
  2301.      ACK, clearing its output buffer and setting the key type to
  2302.      Typematic.   Scanning continues if scanning was enabled.  This
  2303.      command may be sent while using any Scan Code Set but only has
  2304.      effect when Scan Code Set 3 is in use.
  2305.  F8  PS/2 Set All Keys to Make/Break, keyboard responds by sending an
  2306.      ACK, clearing its output buffer and setting the key type to
  2307.      Make/Break.  Scanning continues if scanning was enabled.  This
  2308.      command may be sent while using any Scan Code Set but only has
  2309.      effect when Scan Code Set 3 is in use.
  2310.  F9  PS/2 Set All Keys to Make, keyboard responds by sending an ACK,
  2311.      clearing its output buffer and setting the key type to Make.
  2312.      Scanning continues if scanning was enabled.  This command may
  2313.      be sent while using any Scan Code Set but only has effect when
  2314.      Scan Code Set 3 is in use.
  2315.  FA  PS/2 Set All Keys to Typematic Make/Break, keyboard responds by
  2316.      sending an ACK, clearing its output buffer and setting the key
  2317.      type to Typematic Make/Break.  Scanning continues if scanning
  2318.      was enabled.  This command may be sent while using any Scan Code
  2319.      Set but only has effect when Scan Code Set 3 is in use.
  2320.  FB  PS/2 Set Key Type to Typematic, keyboard responds by sending an
  2321.      ACK, clearing its output buffer and then waiting for the key ID
  2322.      (make code from Scan Code Set 3).  The specified key type is then
  2323.      set to typematic.   This command may be sent while using any
  2324.      Scan Code Set but only has effect when Scan Code Set 3 is in use.
  2325.  FC  PS/2 Set Key Type to Make/Break, keyboard responds by sending an
  2326.      ACK, clearing its output buffer and then waiting for the key ID
  2327.      (make code from Scan Code Set 3).  The specified key type is then
  2328.      set to Make/Break.   This command may be sent while using any Scan
  2329.      Code Set but only has effect when Scan Code Set 3 is in use.
  2330.  FD  PS/2 Set Key Type to Make, keyboard responds by sending an ACK,
  2331.      clearing its output buffer and then waiting for the key ID (make
  2332.      code from Scan Code Set 3).  The specified key type is then set
  2333.      to Make.  This command may be sent while using any Scan Code Set
  2334.      but only has effect when Scan Code Set 3 is in use.
  2335.  FE  Resend, should be sent when a transmission error is detected
  2336.      from the keyboard
  2337.  FF  Reset, Keyboard sends ACK and waits for system to receive it
  2338.      then begins a program reset and Basic Assurance Test (BAT).
  2339.      Keyboard returns a one byte completion code then sets default
  2340.      Scan Code Set 2.
  2341.  
  2342.  
  2343. ^Keyboard Responses to System (via 8042 port 60h)
  2344.  
  2345.  00  Key Detection Error or Overrun Error for Scan Code Set 1,
  2346.      replaces last key in the keyboard buffer if the buffer is full. 
  2347.  AA  BAT Completion Code, keyboard sends this to indicate the keyboard
  2348.      test was successful.
  2349.  EE  Echo Response, response to the Echo command.
  2350.  F0  Break Code Prefix in Scan Code Sets 2 and 3.
  2351.  FA  Acknowledge, keyboard sends this whenever a valid command or
  2352.      data byte is received (except on Echo and Resend commands).
  2353.  FC  BAT Failure Code, keyboard sends this to indicate the keyboard
  2354.      test failed and stops scanning until a response or reset is sent.
  2355.  FE  Resend, keyboard request resend of data when data sent to it is
  2356.      invalid or arrives with invalid parity.
  2357.  FF  Key Detection Error or Overrun Error for Scan Code Set 2 or 3,
  2358.      replaces last key in the keyboard buffer if the buffer is full.
  2359.  id  Keyboard ID Response, keyboard sends a two byte ID after ACK'ing
  2360.      the Read ID command.  The byte stream contains 83AB in LSB, MSB
  2361.      order.  The keyboard then resumes scanning.
  2362.  
  2363.  
  2364.  - command F7 through FD are NOP's on the AT and are ACK'ed but not
  2365.    acted upon
  2366.  - see   8042   MAKE CODES   BREAK CODES   INT 16,3
  2367. :parallel port:printer port
  2368. ^Parallel Printer Port
  2369.  
  2370. %Port 3BC printer data output  (readable)
  2371.  
  2372.   │7│6│5│4│3│2│1│0│  ports 278, 378, 3BC
  2373.    │ │ │ │ │ │ │ └──── data bit 0, hardware pin 2
  2374.    │ │ │ │ │ │ └───── data bit 1, hardware pin 3
  2375.    │ │ │ │ │ └────── data bit 2, hardware pin 4
  2376.    │ │ │ │ └─────── data bit 3, hardware pin 5
  2377.    │ │ │ └──────── data bit 4, hardware pin 6
  2378.    │ │ └───────── data bit 5, hardware pin 7
  2379.    │ └────────── data bit 6, hardware pin 8
  2380.    └─────────── data bit 7, hardware pin 9
  2381.  
  2382. %Port 3BD printer status register   (Parallel Printer Port)
  2383.  
  2384.   │7│6│5│4│3│2│1│0│  ports 279, 379, 3BD
  2385.    │ │ │ │ │ │ │ └──── 1 = time-out
  2386.    │ │ │ │ │ └─┴───── unused
  2387.    │ │ │ │ └──────── 1 = error,  pin 15
  2388.    │ │ │ └───────── 1 = on-line,  pin 13
  2389.    │ │ └────────── 1 = out of paper,  pin 12
  2390.    │ └─────────── 0 = Acknowledge,  pin 10
  2391.    └──────────── 0 = busy,  pin 11
  2392.  
  2393. %Port 3BE printer control register   (Parallel Printer Port)
  2394.  
  2395.   │7│6│5│4│3│2│1│0│  ports 27A, 37A, 3BE
  2396.    │ │ │ │ │ │ │ └──── 1 = output data to printer,  (pin 1)
  2397.    │ │ │ │ │ │ └───── 1 = auto line feed,  (pin 14)
  2398.    │ │ │ │ │ └────── 0 = initialize printer,  (pin 16)
  2399.    │ │ │ │ └─────── 1 = printer reads output,  (pin 17)
  2400.    │ │ │ └──────── 0 = IRQ disable,1=IRQ enable for ACK
  2401.    └─┴─┴───────── unused
  2402.  
  2403. :ports:port addresses:hardware ports
  2404. ^PORTS  Common I/O Port Addresses
  2405.  
  2406.  Port addresses are not always constant across PC, AT and PS2
  2407.  Unless marked, port addresses are relative to PC and XT only
  2408.  
  2409. %000-00F  8237 DMA controller
  2410.  000 Channel 0 address register
  2411.  001 Channel 0 word count
  2412.  002 Channel 1 address register
  2413.  003 Channel 1 word count
  2414.  004 Channel 2 address register
  2415.  005 Channel 2 word count
  2416.  006 Channel 3 address register
  2417.  007 Channel 3 word count
  2418.  008 Status/command register
  2419.  009 Request register
  2420.  00A Mask register
  2421.  00B Mode register
  2422.  00C Clear MSB/LSB flip flop
  2423.  00D Master clear temp register
  2424.  00E Clear mask register
  2425.  00F Multiple mask register
  2426.  
  2427. %010-01F  8237 DMA Controller (PS2 model 60 & 80), reserved (AT)
  2428.  
  2429. %020-02F  8259A Master Programmable Interrupt Controller
  2430.  020 8259 Command port  (see 8259)
  2431.  021 8259 Interrupt mask register  (see 8259)
  2432.  
  2433. %030-03F  8259A Slave Programmable Interrupt Controller (AT,PS2)
  2434.  
  2435. %040-05F  8253 or 8254 Programmable Interval Timer (PIT, see 8253)
  2436.  040 8253 channel 0, counter divisor
  2437.  041 8253 channel 1, RAM refresh counter
  2438.  042 8253 channel 2, Cassette and speaker functions
  2439.  043 8253 mode control  (see 8253)
  2440.  044 8254 PS/2 extended timer
  2441.  047 8254 Channel 3 control byte
  2442.  
  2443. %060-067  8255 Programmable Peripheral Interface  (PC,XT, PCjr)
  2444.  060 8255 Port A keyboard input/output buffer (output PCjr)
  2445.  061 8255 Port B output
  2446.  062 8255 Port C input
  2447.  063 8255 Command/Mode control register
  2448.  
  2449. %060-06F  8042 Keyboard Controller  (AT,PS2)
  2450.  060 8042 Keyboard input/output buffer register
  2451.  061 8042 system control port (for compatability with 8255)
  2452.  064 8042 Keyboard command/status register
  2453.  
  2454.  070 CMOS RAM/RTC, also NMI enable/disable (AT,PS2, see RTC)
  2455.  071 CMOS RAM data  (AT,PS2)
  2456.  
  2457.  080 Manufacturer checkpoint port
  2458. %080-090  DMA Page Registers
  2459.  081 High order 4 bits of DMA channel 2 address
  2460.  082 High order 4 bits of DMA channel 3 address
  2461.  083 High order 4 bits of DMA channel 1 address
  2462.  
  2463. %090-097  POS/Programmable Option Select  (PS2)
  2464.  090 Central arbitration control Port
  2465.  091 Card selection feedback
  2466.  092 System control and status register
  2467.  094 System board enable/setup register
  2468.  095 Reserved
  2469.  096 Adapter enable/setup register
  2470.  097 Reserved
  2471.  
  2472.  0A0 NMI Mask Register (PC,XT) (write 80h to enable NMI, 00h disable)
  2473. %0A0-0BF  Second 8259 Programmable Interrupt Controller (AT, PS2)
  2474.  0A0 Second 8259 Command port  (see 8259)
  2475.  0A1 Second 8259 Interrupt mask register  (see 8259)
  2476.  
  2477.  0C0 TI SN76496 Programmable Tone/Noise Generator (PCjr)
  2478. %0C0-0DF  8237 DMA controller 2 (AT)
  2479.  0C2 DMA channel 3 selector  (see ports 6 & 82)
  2480.  
  2481.  0E0-0EF  Reserved
  2482.  
  2483. %0F0-0FF  Math coprocessor (AT, PS2)
  2484. %0F0-0F5  PCjr Disk Controller
  2485.  0F0 Disk Controller
  2486.  0F2 Disk Controller control port
  2487.  0F4 Disk Controller status register
  2488.  0F5 Disk Controller data port
  2489.  
  2490. %0F8-0FF  Reserved for future microprocessor extensions
  2491.  
  2492. %100-10F  POS Programmable Option Select (PS2)
  2493.  100 POS Register 0, Adapter ID byte (LSB)
  2494.  101 POS Register 1, Adapter ID byte (MSB)
  2495.  102 POS Register 2, Option select data byte 1
  2496.      Bit 0 is card enable (CDEN)
  2497.  103 POS Register 3, Option select data byte 2
  2498.  104 POS Register 4, Option select data byte 3
  2499.  105 POS Register 5, Option select data byte 4
  2500.      Bit 7 is (-CHCK)
  2501.      Bit 6 is reserved
  2502.  106 POS Register 6, subaddress extension (LSB)
  2503.  107 POS Register 7, subaddress extension (MSB)
  2504.  
  2505. %110-1EF  System I/O channel
  2506.  
  2507. %170-17F  Fixed disk 1 (AT)
  2508.  170 disk 1 data
  2509.  171 disk 1 error
  2510.  172 disk 1 sector count
  2511.  173 disk 1 sector number
  2512.  174 disk 1 cylinder low
  2513.  175 disk 1 cylinder high
  2514.  176 disk 1 drive/head
  2515.  177 disk 1 status
  2516.  
  2517. %1F0-1FF  Fixed disk 0 (AT)
  2518.  1F0 disk 0 data
  2519.  1F1 disk 0 error
  2520.  1F2 disk 0 sector count
  2521.  1F3 disk 0 sector number
  2522.  1F4 disk 0 cylinder low
  2523.  1F5 disk 0 cylinder high
  2524.  1F6 disk 0 drive/head
  2525.  1F7 disk 0 status
  2526.  
  2527. %200-20F  Game Adapter (see GAME PORT or JOYSTICK)
  2528.  
  2529. %210-217  Expansion Card Ports (XT)
  2530.  210 Write: latch expansion bus data
  2531.      read:  verify expansion bus data
  2532.  211 Write: clear wait,test latch
  2533.      Read:  MSB of data address
  2534.  212 Read:  LSB of data address
  2535.  213 Write: 0=enable, 1=/disable expansion unit
  2536.  214-215  Receiver Card Ports
  2537.  214 write: latch data, read: data
  2538.  215 read:  MSB of address, next read: LSB of address
  2539.  
  2540.  21F Reserved
  2541.  
  2542. %220-26F  Reserved for I/O channel
  2543.  
  2544. %270-27F  Third parallel port (see PARALLEL PORT)
  2545.  278 data port
  2546.  279 status port
  2547.  27A control port
  2548.  
  2549. %280-2AF  Reserved for I/O channel
  2550.  
  2551. %2A2-2A3  MSM58321RS clock
  2552.  
  2553. %2B0-2DF  Alternate EGA, or 3270 PC video (XT, AT)
  2554.  
  2555.  2E0 Alternate EGA/VGA
  2556.  2E1 GPIB Adapter  (AT)
  2557.  
  2558. %2E2-2E3  Data acquisition adapter (AT)
  2559.  
  2560. %2E8-2EF  COM4 non PS2 UART (Reserved by IBM) (see UART)
  2561.  
  2562. %2F0-2F7  Reserved
  2563.  
  2564. %2F8-2FF  COM2 Second Asynchronous Adapter (see UART)
  2565.           Primary Asynchronous Adapter for PCjr
  2566.  
  2567. %300-31F  Prototype Experimentation Card (except PCjr)
  2568.           Periscope hardware debugger
  2569. %320-32F  Hard Disk Controller  (XT)
  2570.  320 Read from/Write to controller
  2571.  321 Read: Controller Status, Write: controller reset
  2572.  322 Write: generate controller select pulse
  2573.  323 Write: Pattern to DMA and interrupt mask register
  2574.      (see ports 0F,21,C2)
  2575.  324 disk attention/status
  2576.  
  2577. %330-33F  Reserved for XT/370
  2578.  
  2579. %340-35F  Reserved for I/O channel
  2580.  
  2581. %360-36F  PC Network
  2582.  
  2583. %370-377  Floppy disk controller (except PCjr)
  2584.  372 Diskette digital output
  2585.  374 Diskette controller status
  2586.  375 Diskette controller data
  2587.  376 Diskette controller data
  2588.  377 Diskette digital input
  2589.  
  2590. %378-37F  Second Parallel Printer (see PARALLEL PORT)
  2591.           First Parallel Printer (see PARALLEL PORT)
  2592.  378 data port
  2593.  379 status port
  2594.  37A control port
  2595.  
  2596. %380-38F  Secondary Binary Synchronous Data Link Control (SDLC) adapter
  2597.  380 On board 8255 port A, internal/external sense
  2598.  381 On board 8255 port B, external modem interface
  2599.  382 On board 8255 port C, internal control and gating
  2600.  383 On board 8255 mode register
  2601.  384 On board 8253 channel square wave generator
  2602.  385 On board 8253 channel 1 inactivity time-out
  2603.  386 On board 8253 channel 2 inactivity time-out
  2604.  387 On board 8253 mode register
  2605.  388 On board 8273 read: status; Write: Command
  2606.  389 On board 8273 write: parameter; read: response
  2607.  38A On board 8273 transmit interrupt status
  2608.  38B On board 8273 receiver interrupt status
  2609.  38C On board 8273 data
  2610.  
  2611. %390-39F  Cluster Adapter
  2612.  
  2613. %3A0-3AF  Primary Binary Synchronous Data Link Control (SDLC) adapter
  2614.  3A0 On board 8255 port A, internal/external sense
  2615.  3A1 On board 8255 port B, external modem interface
  2616.  3A2 On board 8255 port C, internal control and gating
  2617.  3A3 On board 8255 mode register
  2618.  3A4 On board 8253 counter 0 unused
  2619.  3A5 On board 8253 counter 1 inactivity time-outs
  2620.  3A6 On board 8253 counter 2 inactivity time-outs
  2621.  3A7 On board 8253 mode register
  2622.  3A8 On board 8251 data
  2623.  3A9 On board 8251 command/mode/status register
  2624.  
  2625. %3B0-3BF Monochrome Display Adapter (write only, see 6845)
  2626.  3B0 port address decodes to 3B4
  2627.  3B1 port address decodes to 3B5
  2628.  3B2 port address decodes to 3B4
  2629.  3B3 port address decodes to 3B5
  2630.  3B4 6845 index register, selects which register [0-11h]
  2631.      is to be accessed through port 3B5
  2632.  3B5 6845 data register [0-11h] selected by port 3B4,
  2633.      registers 0C-0F may be read.  If a read occurs without
  2634.      the adapter installed, FFh is returned.  (see 6845)
  2635.  3B6 port address decodes to 3B4
  2636.  3B7 port address decodes to 3B5
  2637.  3B8 6845 Mode control register
  2638.  3B9 reserved for color select register on color adapter
  2639.  3BA status register (read only)
  2640.  3BB reserved for light pen strobe reset
  2641.  
  2642. %3BC-3BF  Primary Parallel Printer Adapter (see PARALLEL PORT)
  2643.  3BC parallel 1, data port
  2644.  3BD parallel 1, status port
  2645.  3BE parallel 1, control port
  2646.  
  2647. %3C0-3CF  EGA/VGA
  2648.  3C0 VGA attribute and sequencer register
  2649.  3C1 Other video attributes
  2650.  3C2 EGA, VGA, CGA input status 0
  2651.  3C3 Video subsystem enable
  2652.  3C4 CGA, EGA, VGA sequencer index
  2653.  3C5 CGA, EGA, VGA sequencer
  2654.  3C6 VGA video DAC PEL mask
  2655.  3C7 VGA video DAC state
  2656.  3C8 VGA video DAC PEL address
  2657.  3C9 VGA video DAC
  2658.  3CA VGA graphics 2 position
  2659.  3CC VGA graphics 1 position
  2660.  3CD VGA feature control
  2661.  3CE VGA graphics index
  2662.  3CF Other VGA graphics
  2663.  
  2664. %3D0-3DF Color Graphics Monitor Adapter (ports 3D0-3DB are
  2665.          write only, see 6845)
  2666.  3D0 port address decodes to 3D4
  2667.  3D1 port address decodes to 3D5
  2668.  3D2 port address decodes to 3D4
  2669.  3D3 port address decodes to 3D5
  2670.  3D4 6845 index register, selects which register [0-11h]
  2671.      is to be accessed through port 3D5
  2672.  3D5 6845 data register [0-11h] selected by port 3D4,
  2673.      registers 0C-0F may be read.  If a read occurs without
  2674.      the adapter installed, FFh is returned.  (see 6845)
  2675.  3D6 port address decodes to 3D4
  2676.  3D7 port address decodes to 3D5
  2677.  3D8 6845 Mode control register (CGA, EGA, VGA, except PCjr)
  2678.  3D9 color select palette register (CGA, EGA, VGA, see 6845)
  2679.  3DA status register (read only, see 6845, PCjr VGA access)
  2680.  3DB Clear light pen latch (any write)
  2681.  3DC Preset Light pen latch
  2682.  3DF CRT/CPU page register (PCjr only)
  2683.  
  2684. %3E8-3EF  COM3 non PS2 UART (Reserved by IBM) (see UART)
  2685.  
  2686. %3F0-3F7  Floppy disk controller (except PCjr)
  2687.  3F0 Diskette controller status A
  2688.  3F1 Diskette controller status B
  2689.  3F2 controller control port
  2690.  3F4 controller status register
  2691.  3F5 data register (write 1-9 byte command, see INT 13)
  2692.  3F6 Diskette controller data
  2693.  3F7 Diskette digital input
  2694.  
  2695. %3F8-3FF  COM1 Primary Asynchronous Adapter  (see UART)
  2696.  
  2697.  3220-3227  PS2 COM3 (see UART)
  2698.  3228-322F  PS2 COM4 (see UART)
  2699.  4220-4227  PS2 COM5 (see UART)
  2700.  4228-422F  PS2 COM6 (see UART)
  2701.  5220-5227  PS2 COM7 (see UART)
  2702.  5228-522F  PS2 COM8 (see UART)
  2703.  
  2704.  - many cards designed for the ISA BUS only uses the lower 10 bits
  2705.    of the port address but some ISA adapters use addresses beyond 3FF.
  2706.    Any address that matches in the lower 10 bits will decode to the
  2707.    same card.   It is up to the adapters to resolve or ignore the
  2708.    high bits of the port addresses.   An example would be the Cluster
  2709.    adapter that has a port address of 390h.  The second cluster
  2710.    adapter has a port address of 790h which resolves to the same port
  2711.    address with the cards determining which one actually gets the data.
  2712. :diagnostic codes:post errors
  2713. ^DIAGS  IBM PC Diagnostic Error Codes
  2714.  
  2715. %Code       Description    (Diagnostic Error Codes)
  2716.  
  2717.   1x   undetermined problem errors
  2718.   2x   power supply errors
  2719.   61   battery error (PS2)
  2720.   62   configuration changed but no adaptors changed or CRC error
  2721.   63   memory size during POST does not match CMOS RAM
  2722.   65   card Id's in CMOS do not match system
  2723.  
  2724. %1xx   System Board Errors
  2725.  101   system board failed
  2726.  102   BIOS ROM checksum error (PC, XT), Timer (AT)
  2727.  103   BASIC ROM checksum error (PC, XT), Timer interrupt (AT)
  2728.  104   interrupt controller (PC, XT), Protected mode (AT)
  2729.  105   timer (PC,XT), Last 8042 command not accepted (AT)
  2730.  106   converting logic test failure
  2731.  107   adapter card or math coprocessor (NMI)
  2732.  108   timer bus test
  2733.  109   DMA test error
  2734.  110   system board memory error (PS2)
  2735.  111   adapter memory
  2736.  112   system unit adapter failure
  2737.  114   system unit and adapter card unit failure (PS1)
  2738.  121   unexpected hardware interrupt
  2739.  131   cassette wrap test failed
  2740.  151   real-time clock, CMOS RAM or battery
  2741.  152   real-time clock
  2742.  161   system options error, battery failure
  2743.  162   CMOS RAM configuration error
  2744.  163   CMOS time and date not set
  2745.  164   system memory configuration is incorrect
  2746.  165   adapter added/removed
  2747.  199   user indicated configuration not correct
  2748.  
  2749. %2xx   RAM Errors
  2750.  201   memory test error
  2751.  202   memory address error (Line error  0 - 15)
  2752.  203   memory address error (Line error 16 - 23)
  2753.  216   motherboard memory
  2754.  
  2755. %3xx   Keyboard Errors
  2756.  301   keyboard did not respond to software reset or a stuck
  2757.        (number preceding 301 is scan code for stuck key)
  2758.  302   user indicated keyboard error or AT system unit is locked
  2759.  303   keyboard or system board error
  2760.  304   keyboard or system board error; CMOS does not match system
  2761.  341   replace keyboard
  2762.  342   replace keyboard interface cable
  2763.  343   replace enhancement card or cable
  2764.  365   keyboard (replace keyboard)
  2765.  366   interface cable (replace cable)
  2766.  367   enhancement card or cable (replace)
  2767.  
  2768. %4xx   Monochrome Monitor Errors
  2769.  401   monochrome memory test, horizontal sync frequency
  2770.        test, or video test failed
  2771.  408   user indicated display attributes failure
  2772.  416   user indicated character set failure
  2773.  424   user indicated 80x25 mode failure
  2774.  432   parallel port test failed (monochrome adapter)
  2775.  
  2776. %5xx   Color Monitor Errors
  2777.  501   CGA memory test failed, horizontal sync frequency test, or
  2778.        video test failed
  2779.  508   user indicated display attribute failure
  2780.  516   user indicated character set failure
  2781.  524   user indicated 80x25 mode failure
  2782.  532   user indicated 40x25 mode failure
  2783.  540   user indicated 320x200 graphics mode failure
  2784.  548   user indicated 640x200 graphics mode failure
  2785.  556   light pen test
  2786.  564   user indicated screen paging test
  2787.  
  2788. %6xx   Diskette Drive/Adapter Errors
  2789.  601   diskette power on diagnostics test failed
  2790.  602   diskette test failed (boot record not valid)
  2791.  603   diskette size error
  2792.  606   diskette verify function failed
  2793.  607   write protected diskette
  2794.  608   bad command diskette status returned
  2795.  610   diskette initialization failed
  2796.  611   time-out - diskette status returned
  2797.  612   bad NEC FDC - diskette status returned
  2798.  613   bad DMA - diskette status returned
  2799.  614   DMA boundary error
  2800.  621   bad seek - diskette status returned
  2801.  622   bad CRC - diskette status returned
  2802.  623   record not found - diskette status returned
  2803.  624   bad address mark - diskette status returned
  2804.  625   bad NEC seek - diskette status returned
  2805.  626   diskette data compare error
  2806.  627   diskette change line error
  2807.  628   diskette removed
  2808.  
  2809. %7xx   8087 Math Coprocessor
  2810.  701   coprocessor test failure
  2811.  
  2812. %9xx   Parallel Printer Adapter Errors
  2813.  901   parallel printer adapter test failed
  2814.  
  2815. %10xx  Alternate Parallel Printer Adapter
  2816.  1001  alternate printer adapter test failure
  2817.  
  2818. %11xx  Asynchronous Communications Adapter Errors
  2819.  1101  asynchronous communications adapter test failed
  2820.  1110  modem status register not clear
  2821.  1111  ring-indicate
  2822.  1112  trailing edge ring-indicate
  2823.  1113  receive and delta receive line signal detect
  2824.  1114  receive line signal detect
  2825.  1115  delta receive line signal detect
  2826.  1116  line control register: all bits cannot be set
  2827.  1117  line control register: all bits cannot be reset
  2828.  1118  transmit holding and/or shift register stuck on
  2829.  1119  data ready stuck on
  2830.  1120  interrupt enable register: all bits cannot be set
  2831.  1121  interrupt enable register: all bits cannot be reset
  2832.  1122  interrupt pending stuck on
  2833.  1123  interrupt ID register stuck on
  2834.  1124  modem control register: all bits cannot be set
  2835.  1125  modem control register: all bits cannot be reset
  2836.  1126  modem status register: all bits cannot be set
  2837.  1127  modem status register: all bits cannot be reset
  2838.  1128  interrupt ID
  2839.  1129  cannot force overrun error
  2840.  1130  no modem status interrupt
  2841.  1131  invalid interrupt pending
  2842.  1132  no data ready
  2843.  1133  no data available interrupt
  2844.  1134  no transmit holding interrupt
  2845.  1135  no interrupts
  2846.  1136  no received line status interrupt
  2847.  1137  no receive data available
  2848.  1138  transmit holding register not empty
  2849.  1139  no modem status interrupt
  2850.  1140  transmit holding register not empty
  2851.  1141  no interrupts
  2852.  1142  no IRQ4 interrupt
  2853.  1143  no IRQ3 interrupt
  2854.  1144  no data transferred
  2855.  1145  maximum baud rate
  2856.  1146  minimum baud rate
  2857.  1148  time-out error
  2858.  1149  invalid data returned
  2859.  1150  modem status register error
  2860.  1151  no DSR and delta DSR
  2861.  1152  no DSR
  2862.  1153  no delta DSR
  2863.  1154  modem status register not clear
  2864.  1155  no CTS and delta CTS
  2865.  1156  no CTS
  2866.  1157  no delta CTS
  2867.  
  2868. %12xx  Alternate Asynchronous Communications Adapter
  2869.  1200-1257 same as 1100-1157
  2870.  
  2871. %13xx  Game Control Adapter Errors
  2872.  1301  game control adapter test failed
  2873.  1302  joystick test failed
  2874.  1380  audio card and joystick (PS1)
  2875.  
  2876. %14xx  Printer Errors
  2877.  1401  printer test failed
  2878.  1404  matrix printer failed
  2879.  
  2880. %15xx  SDLC Communications Adapter Errors
  2881.  1501  adapter test failure
  2882.  1510  8255 port b failure
  2883.  1511  8255 port a failure
  2884.  1512  8255 port c failure
  2885.  1513  8253 timer 1 did not reach terminal count
  2886.  1514  8253 timer 1 stuck on
  2887.  1515  8253 timer 0 did not reach terminal count
  2888.  1516  8253 timer 0 stuck on
  2889.  1517  8253 timer 2 did not reach terminal count
  2890.  1518  8253 timer 2 stuck on
  2891.  1519  8273 port b error
  2892.  1520  8273 port a error
  2893.  1521  8273 command/read time-out
  2894.  1522  interrupt level 4 failure
  2895.  1523  ring Indicate stuck on
  2896.  1524  receive clock stuck on
  2897.  1525  transmit clock stuck on
  2898.  1526  test indicate stuck on
  2899.  1527  ring indicate not on
  2900.  1528  receive clock not on
  2901.  1529  transmit clock not on
  2902.  1530  test indicate not on
  2903.  1531  DSR not on
  2904.  1532  CD not on
  2905.  1533  CTS not on
  2906.  1534  DSR stuck on
  2907.  1535  CD stuck on
  2908.  1536  CTS stuck on
  2909.  1537  level 3 interrupt failure
  2910.  1538  receive interrupt results error
  2911.  1539  wrap data compare error
  2912.  1540  DMA channel 1 error
  2913.  1541  DMA channel 1 error
  2914.  1542  error in 8273 error checking or status reporting
  2915.  1547  stray interrupt level 4
  2916.  1548  stray interrupt level 3
  2917.  1549  interrupt presentation sequence time-out
  2918.  
  2919. %16xx  Display Emulation Errors (327x, 5520, 525x)
  2920.  
  2921. %17xx  Fixed Disk Errors
  2922.  1701  post error
  2923.  1702  adapter error
  2924.  1703  drive error (seek)
  2925.  1704  adapter or drive error
  2926.  1705  no record found
  2927.  1706  write fault error
  2928.  1707  track 0 error
  2929.  1708  head select error
  2930.  1709  defective error check
  2931.  1710  read buffer overrun
  2932.  1711  bad address mark
  2933.  1712  undetermined error
  2934.  1713  data compare error
  2935.  1714  drive not ready
  2936.  1780  disk 0 failure
  2937.  1781  disk 1 failure
  2938.  1782  disk controller failure
  2939.  1790  fixed disk 0 error
  2940.  1791  fixed disk 1 error
  2941.  
  2942. %18xx  I/O Expansion Unit Errors
  2943.  1801  I/O expansion unit POST error
  2944.  1810  enable/disable failure
  2945.  1811  extender card wrap test failed (disabled)
  2946.  1812  high order address lines failure (disabled)
  2947.  1813  wait state failure (disabled)
  2948.  1814  enable/disable could not be set on
  2949.  1815  wait state failure (enabled)
  2950.  1816  extender card wrap test failed (enabled)
  2951.  1817  high order address lines failure (enabled)
  2952.  1818  disable not functioning
  2953.  1819  wait request switch not set correctly
  2954.  1820  receiver card wrap test failure
  2955.  1821  receiver high order address lines failure
  2956.  
  2957. %19xx  3270 PC Attachment Card Errors
  2958.  
  2959. %20xx  Bisync Communications Adapter Errors
  2960.  2010  8255 port a failure
  2961.  2011  8255 port b failure
  2962.  2012  8255 port c failure
  2963.  2013  8253 timer 1 did not reach terminal count
  2964.  2014  8253 timer 1 stuck on
  2965.  2016  8253 timer 2 didn't reach terminal count or timer 2 stuck on
  2966.  2017  8251 DSR failed to come on
  2967.  2018  8251 CTS not sensed
  2968.  2019  8251 DSR stuck on
  2969.  2020  8251 CTS stuck on
  2970.  2021  8251 hardware reset failed
  2971.  2022  8251 software reset failed
  2972.  2023  8251 software error reset failed
  2973.  2024  8251 transmit ready did not come on
  2974.  2025  8251 receive ready did not come on
  2975.  2026  8251 could not force "overrun" error status
  2976.  2027  interrupt failure, no timer interrupt
  2977.  2028  transmit interrupt, card or planar failure
  2978.  2029  transmit interrupt, card failure
  2979.  2030  receive interrupt, card or planar failure
  2980.  2031  receive interrupt, card failure
  2981.  2033  ring indicate stuck on
  2982.  2034  receive clock stuck on
  2983.  2035  transmit clock stuck on
  2984.  2036  test indicate stuck on
  2985.  2037  ring indicate stuck on
  2986.  2038  receive clock not on
  2987.  2039  transmit clock not on
  2988.  2040  test indicate not on
  2989.  2041  DSR not on
  2990.  2042  CD not on
  2991.  2043  CTS not on
  2992.  2044  DSR stuck on
  2993.  2045  CD stuck on
  2994.  2046  CTS stuck on
  2995.  2047  unexpected transmit interrupt
  2996.  2048  unexpected receive interrupt
  2997.  2049  transmit data did not equal receive data
  2998.  2050  8251 detected overrun error
  2999.  2051  lost DSR during data wrap
  3000.  2052  receive time-out during data wrap
  3001.  
  3002. %21xx  Alternate Bisync Communications Adapter Errors
  3003.  2100-2152 same as 2000-2052
  3004.  
  3005. %22xx  Cluster Adapter Errors
  3006.  
  3007. %24xx  EGA Errors
  3008.  2401  adapter test failure
  3009.  2408  user-indicated display attributes
  3010.  2416  user-indicated character set
  3011.  2424  user-indicated 80x25 mode
  3012.  2432  user-indicated 40x25 mode
  3013.  2440  user-indicated 320x200 graphics mode
  3014.  2448  user-indicated 640x200 graphics mode
  3015.  2456  light pen test
  3016.  2464  user-indicated screen paging test
  3017.  
  3018. %2501  EGA Display Error
  3019.  
  3020. %28xx  3278/79 Emulator Adapter (PC, XT)
  3021.  
  3022. %29xx  Color Matrix Printer Errors
  3023.  
  3024. %30xx  Local Area Network Adapter
  3025.  
  3026. %31xx  Alternate Local Area Network Adapter
  3027.  
  3028. %33xx  Compact Printer Errors
  3029.  
  3030. %36xx  IEEE 488 Adapter
  3031.  
  3032. %37xx  Reserved for Future Use
  3033.  
  3034. %38xx  Data Acquisition Adapter
  3035.  
  3036. %39xx  PGA Display and/or Adapter
  3037.  
  3038. %48xx  Internal Modem
  3039.  
  3040. %49xx  Alternate Internal Modem
  3041.  
  3042. %71xx  Voice Communications Adapter
  3043.  
  3044. %73xx  3.5 Inch Diskette Drive
  3045.  7301  diskette drive/adapter test failure
  3046.  7306  diskette change line error
  3047.  7307  write-protected diskette
  3048.  7308  bad command
  3049.  7310  track zero error
  3050.  7311  timeout
  3051.  7312  bad NEC7313 bad DMA
  3052.  7314  DMA boundary error
  3053.  7315  bad index
  3054.  7316  speed error
  3055.  7321  bad seek
  3056.  7322  bad CRC
  3057.  7323  record not found
  3058.  7324  bad address mark
  3059.  7325  bad NEC seek
  3060.  
  3061. %86xx  PS1 Mouse Error
  3062.  
  3063.  
  3064.  - all error codes for the diagnostic and advanced diagnostic
  3065.    packages for the PC, XT and AT are represented with the device
  3066.    number followed by two digits other than 00.  The device number
  3067.    plus 00 represents successful completion of the test.
  3068.  
  3069. :resistor values
  3070. ^Resistor Color Code Chart
  3071.  
  3072. %     Color     Digit     Multiplier
  3073.  
  3074.       Black       0        1
  3075.       Brown       1        10
  3076.       Red         2        100            Gold     ± 5% tolerance
  3077.       Orange      3        1,000          Silver   ±10% tolerance
  3078.       Yellow      4        10,000
  3079.       Green       5        100,000
  3080.       Blue        6        1,000,000
  3081.       Violet      7        10,000,000
  3082.       Gray        8        100,000,000
  3083.       White       9        1,000,000,000
  3084.  
  3085. %      ╒═████░██▒██▓██░████═╕
  3086. %      ┴                    ┴
  3087.              │  │  │  │
  3088.              │  │  │  └────────── tolerance (gold or silver)
  3089.              │  │  └──────────── Ohm value multiplier
  3090.              └──┴────────────── first 2 digits of Ohm value
  3091. :rs232 pins:serial ports
  3092. ^RS232  Communication Configuration
  3093.  
  3094. %        IBM PC                          IBM AT
  3095. %Pin  25-Pin Signal (DTE)         Pin  9-Pin Signal (DTE)
  3096.  
  3097.    1   Chassis Ground  (GND)      1   Carrier Detect (CD)
  3098.    2   Transmit Data (TD)         2   Receive Data (RD)
  3099.    3   Receive Data (RD)          3   Transmit Data (TD)
  3100.    4   Request to Send (RTS)      4   Data Terminal Ready (DTR)
  3101.    5   Clear to Send (CTS)        5   Signal Ground (SG)
  3102.    6   Data Set Ready (DSR)       6   Data Set Ready (DSR)
  3103.    7   Signal Ground (SG)         7   Request to Send (RTS)
  3104.    8   Carrier Detect (CD)        8   Clear to Send (CTS)
  3105.  9-19  (not used)                 9   Ring Indicator (RI)
  3106.   20   Data Terminal Ready (DTR)
  3107.   22   Ring Indicator (RI)
  3108.  
  3109.  There are two general cable configurations used with the RS-232C
  3110.  Communications Standard:
  3111.  
  3112.    Data Terminal Equipment (DTE): IBM PC's, printers, plotters, etc
  3113.    Data Communication Equipment (DCE): modems, multiplexors, etc
  3114.  
  3115.  DCE to DTE requires all lines run straight through
  3116.  DTE to DTE usually requires swapping of the following lines
  3117.  
  3118.       RD  and TD                    RD  and TD
  3119.       RTS and CTS          or       RTS,CTS and DCD
  3120.       DTR and DSR                   DCD and RTS,CTS
  3121.  
  3122. %Signal Functions
  3123.  
  3124.  GND    Ground               protective safety ground
  3125.  TD     Transmit Data        DTE output data
  3126.  RD     Receive Data         DTE input data
  3127.  RTS    Request To Send      DTE output, DTE would like to transmit
  3128.  CTS    Clear To Send        DTE input, DCE is ready to transmit
  3129.  DSR    Data Set Ready       DTE input, DCE is ready to communicate
  3130.  SG     Signal Ground        provides a Zero reference voltage
  3131.  DCD    Data Carrier Detect  DTE input, data link established, also
  3132.                              known as Receive Line Signal Detect (RLSD)
  3133.  DTR    Data Terminal Ready  DTE output, device ready
  3134.  RI     Ring Indicator       DTE input, announces incoming call
  3135.  
  3136.  
  3137.  - RTS/CTS is used for half duplex line turn around
  3138.  - in half duplex DCD is asserted only by the receiving device
  3139.  - full duplex modems tie CTS & DCD together (no CTS/RTS handshaking)
  3140.  - most modems require DTR to be present to respond to commands
  3141.  - maximum voltages are between -15 volts and +15 volts
  3142.  - binary outputs are between +5 to +15 volts and -5 to -15 volts
  3143.  - binary inputs are between +3 to +15 volts and -3 to -15 volts
  3144.  - input voltages between -3 to +3 are undefined while output voltages
  3145.    between -5 and +5 are undefined
  3146.  - positive voltages indicate ON or SPACE, negative voltages indicate
  3147.    OFF or MARK
  3148.  
  3149.